\input{preamble}

% OK, start here.
%
\begin{document}

\title{Fundamental Groups of Schemes}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
In this chapter we discuss Grothendieck's fundamental group of a scheme
and applications. A foundational reference is \cite{SGA1}.
A nice introduction is \cite{Lenstra}.
Other references \cite{Murre-lectures} and \cite{Grothendieck-Murre}.










\section{Schemes \'etale over a point}
\label{section-schemes-etale-point}

\noindent
In this section we describe schemes \'etale over the spectrum of a field.
Before we state the result we introduce the category of $G$-sets for a
topological group $G$.

\begin{definition}
\label{definition-G-set-continuous}
Let $G$ be a topological group.
A {\it $G$-set}, sometimes called a {\it discrete $G$-set},
is a set $X$ endowed with a left action $a : G \times X \to X$
such that $a$ is continuous when $X$ is given the discrete topology and
$G \times X$ the product topology.
A {\it morphism of $G$-sets} $f : X \to Y$ is simply any $G$-equivariant
map from $X$ to $Y$.
The category of $G$-sets is denoted {\it $G\textit{-Sets}$}.
\end{definition}

\noindent
The condition that $a : G \times X \to X$ is continuous signifies
simply that the stabilizer of any  $x \in X$ is open in $G$.
If $G$ is an abstract group $G$ (i.e., a group but not a topological group)
then this agrees with our preceding definition (see for example
Sites, Example \ref{sites-example-site-on-group})
provided we endow $G$ with the discrete topology.

\medskip\noindent
Recall that if $L/K$ is an infinite Galois extension then the
Galois group $G = \text{Gal}(L/K)$ comes endowed with a canonical
topology, see Fields, Section \ref{fields-section-infinite-galois}.

\begin{lemma}
\label{lemma-sheaves-point}
Let $K$ be a field. Let $K^{sep}$ be a separable closure of $K$.
Consider the profinite group $G = \text{Gal}(K^{sep}/K)$.
The functor
$$
\begin{matrix}
\text{schemes \'etale over }K &
\longrightarrow &
G\textit{-Sets} \\
X/K & \longmapsto &
\Mor_{\Spec(K)}(\Spec(K^{sep}), X)
\end{matrix}
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
A scheme $X$ over $K$ is \'etale over $K$ if and only if
$X \cong \coprod_{i\in I} \Spec(K_i)$ with
each $K_i$ a finite separable extension of $K$
(Morphisms, Lemma \ref{morphisms-lemma-etale-over-field}).
The functor of the lemma associates to $X$ the $G$-set
$$
\coprod\nolimits_i \Hom_K(K_i, K^{sep})
$$
with its natural left $G$-action. Each element has an open stabilizer
by definition of the topology on $G$. Conversely, any $G$-set $S$
is a disjoint union of its orbits. Say $S = \coprod S_i$. Pick $s_i \in S_i$
and denote $G_i \subset G$ its open stabilizer. By Galois theory
(Fields, Theorem \ref{fields-theorem-inifinite-galois-theory})
the fields $(K^{sep})^{G_i}$ are finite separable field extensions of $K$, and
hence the scheme
$$
\coprod\nolimits_i \Spec((K^{sep})^{G_i})
$$
is \'etale over $K$. This gives an inverse to the functor of the lemma.
Some details omitted.
\end{proof}

\begin{remark}
\label{remark-covering-surjective}
Under the correspondence of Lemma \ref{lemma-sheaves-point},
the coverings in the small \'etale site
$\Spec(K)_\etale$ of $K$ correspond to surjective families of
maps in $G\textit{-Sets}$.
\end{remark}









\section{Galois categories}
\label{section-galois}

\noindent
In this section we discuss some of the material the reader can
find in \cite[Expos\'e V, Sections 4, 5, and 6]{SGA1}.

\medskip\noindent
Let $F : \mathcal{C} \to \textit{Sets}$ be a functor.
Recall that by our conventions categories have a set of objects and
for any pair of objects a set of morphisms. There is a canonical
injective map
\begin{equation}
\label{equation-embedding-product}
\text{Aut}(F)
\longrightarrow
\prod\nolimits_{X \in \Ob(\mathcal{C})} \text{Aut}(F(X))
\end{equation}
For a set $E$ we endow $\text{Aut}(E)$ with the compact open topology, see
Topology, Example \ref{topology-example-automorphisms-of-a-set}.
Of course this is the discrete topology when $E$ is finite, which
is the case of interest in this section\footnote{When we discuss the
pro-\'etale fundamental group the general case will be of interest.}.
We endow $\text{Aut}(F)$ with the topology induced from the
product topology on the right hand side of (\ref{equation-embedding-product}).
In particular, the action maps
$$
\text{Aut}(F) \times F(X) \longrightarrow F(X)
$$
are continuous when $F(X)$ is given the discrete topology because this
is true for the action maps $\text{Aut}(E) \times E \to E$ for any set $E$.
The universal property of our topology on $\text{Aut}(F)$ is the following:
suppose that $G$ is a topological group and $G \to \text{Aut}(F)$
is a group homomorphism such that the induced actions $G \times F(X) \to F(X)$
are continuous for all $X \in \Ob(\mathcal{C})$ where $F(X)$ has
the discrete topology. Then $G \to \text{Aut}(F)$ is continuous.

\medskip\noindent
The following lemma tells us that the group of automorphisms of a functor
to the category of finite sets is automatically a profinite group.

\begin{lemma}
\label{lemma-aut-inverse-limit}
Let $\mathcal{C}$ be a category and let $F : \mathcal{C} \to \textit{Sets}$
be a functor. The map (\ref{equation-embedding-product}) identifies
$\text{Aut}(F)$ with a closed subgroup of
$\prod_{X \in \Ob(\mathcal{C})} \text{Aut}(F(X))$.
In particular, if $F(X)$ is finite for all $X$, then
$\text{Aut}(F)$ is a profinite group.
\end{lemma}

\begin{proof}
Let $\xi = (\gamma_X) \in \prod \text{Aut}(F(X))$ be an element not in
$\text{Aut}(F)$. Then there exists a morphism $f : X \to X'$ of $\mathcal{C}$
and an element $x \in F(X)$ such that
$F(f)(\gamma_X(x)) \not = \gamma_{X'}(F(f)(x))$.
Consider the open neighbourhood
$U = \{\gamma \in \text{Aut}(F(X)) \mid \gamma(x) = \gamma_X(x)\}$
of $\gamma_X$ and the open neighbourhood
$U' = \{\gamma' \in \text{Aut}(F(X')) \mid \gamma'(F(f)(x)) =
\gamma_{X'}(F(f)(x))\}$.
Then
$U \times U' \times \prod_{X'' \not = X, X'} \text{Aut}(F(X''))$
is an open neighbourhood of $\xi$ not meeting $\text{Aut}(F)$.
The final statement follows from the fact that
$\prod \text{Aut}(F(X))$ is a profinite space if each $F(X)$ is finite.
\end{proof}

\begin{example}
\label{example-galois-category-G-sets}
Let $G$ be a topological group. An important example will be the
forgetful functor
\begin{equation}
\label{equation-forgetful}
\textit{Finite-}G\textit{-Sets} \longrightarrow \textit{Sets}
\end{equation}
where $\textit{Finite-}G\textit{-Sets}$ is the full subcategory of
$G\textit{-Sets}$ whose objects are the finite $G$-sets.
The category $G\textit{-Sets}$ of $G$-sets is defined in
Definition \ref{definition-G-set-continuous}.
\end{example}

\noindent
Let $G$ be a topological group. The {\it profinite completion} of $G$
will be the profinite group
$$
G^\wedge =
\lim_{U \subset G\text{ open, normal, finite index}} G/U
$$
with its profinite topology. Observe that the limit is cofiltered
as a finite intersection of open, normal subgroups of finite index
is another. The universal property of the profinite completion is
that any continuous map $G \to H$ to a profinite group $H$ factors
canonically as $G \to G^\wedge \to H$.

\begin{lemma}
\label{lemma-single-out-profinite}
Let $G$ be a topological group. The automorphism group of the functor
(\ref{equation-forgetful}) endowed with its profinite topology from
Lemma \ref{lemma-aut-inverse-limit} is the profinite completion of $G$.
\end{lemma}

\begin{proof}
Denote $F_G$ the functor (\ref{equation-forgetful}). Any morphism
$X \to Y$ in $\textit{Finite-}G\textit{-Sets}$ commutes with the action
of $G$. Thus any $g \in G$ defines an automorphism of $F_G$ and
we obtain a canonical homomorphism $G \to \text{Aut}(F_G)$ of groups.
Observe that any finite $G$-set $X$ is a finite disjoint union of
$G$-sets of the form $G/H_i$ with canonical $G$-action where
$H_i \subset G$ is an open subgroup of finite index. Then
$U_i = \bigcap gH_ig^{-1}$ is open, normal, and has finite index.
Moreover $U_i$ acts trivially on $G/H_i$ hence
$U = \bigcap U_i$ acts trivially on $F_G(X)$. Hence the action
$G \times F_G(X) \to F_G(X)$ is continuous. By the universal
property of the topology on $\text{Aut}(F_G)$ the map
$G \to \text{Aut}(F_G)$ is continuous.
By Lemma \ref{lemma-aut-inverse-limit} and the universal property
of profinite completion there is an induced
continuous group homomorphism
$$
G^\wedge \longrightarrow \text{Aut}(F_G)
$$
Moreover, since $G/U$ acts faithfully on $G/U$ this map is
injective. If the image is dense, then the map is surjective and hence a
homeomorphism by Topology, Lemma \ref{topology-lemma-bijective-map}.

\medskip\noindent
Let $\gamma \in \text{Aut}(F_G)$ and let $X \in \Ob(\mathcal{C})$.
We will show there is a $g \in G$ such that $\gamma$ and $g$
induce the same action on $F_G(X)$. This will finish the proof.
As before we see that $X$ is a finite disjoint union of $G/H_i$.
With $U_i$ and $U$ as above, the finite $G$-set $Y = G/U$
surjects onto $G/H_i$ for all $i$ and hence it suffices to
find $g \in G$ such that $\gamma$ and $g$ induce the same action
on $F_G(G/U) = G/U$. Let $e \in G$ be the neutral element and
say that $\gamma(eU) = g_0U$ for some $g_0 \in G$. For any
$g_1 \in G$ the morphism
$$
R_{g_1} : G/U \longrightarrow G/U,\quad gU \longmapsto gg_1U
$$
of $\textit{Finite-}G\textit{-Sets}$ commutes with the action of
$\gamma$. Hence
$$
\gamma(g_1U) = \gamma(R_{g_1}(eU)) = R_{g_1}(\gamma(eU)) =
R_{g_1}(g_0U) = g_0g_1U
$$
Thus we see that $g = g_0$ works.
\end{proof}

\noindent
Recall that an exact functor is one which commutes with all
finite limits and finite colimits. In particular such a functor
commutes with equalizers, coequalizers, fibred products,
pushouts, etc.

\begin{lemma}
\label{lemma-second-fundamental-functor}
Let $G$ be a topological group. Let
$F : \textit{Finite-}G\textit{-Sets} \to \textit{Sets}$
be an exact functor with $F(X)$ finite for all $X$.
Then $F$ is isomorphic to the functor (\ref{equation-forgetful}).
\end{lemma}

\begin{proof}
Let $X$ be a nonempty object of $\textit{Finite-}G\textit{-Sets}$.
The diagram
$$
\xymatrix{
X \ar[r] \ar[d] & \{*\} \ar[d] \\
\{*\} \ar[r] & \{*\}
}
$$
is cocartesian. Hence we conclude that $F(X)$ is nonempty.
Let $U \subset G$ be an open, normal subgroup with finite index.
Observe that
$$
G/U \times G/U = \coprod\nolimits_{gU \in G/U} G/U
$$
where the summand corresponding to $gU$ corresponds to the orbit of
$(eU, gU)$ on the left hand side. Then we see that
$$
F(G/U) \times F(G/U) = F(G/U \times G/U) = \coprod\nolimits_{gU \in G/U} F(G/U)
$$
Hence $|F(G/U)| = |G/U|$ as $F(G/U)$ is nonempty. Thus we see that
$$
\lim_{U \subset G\text{ open, normal, finite idex}} F(G/U)
$$
is nonempty (Categories, Lemma \ref{categories-lemma-nonempty-limit}).
Pick $\gamma = (\gamma_U)$ an element in this limit.
Denote $F_G$ the functor (\ref{equation-forgetful}). We can identify
$F_G$ with the functor
$$
X \longmapsto \colim_U \Mor(G/U, X)
$$
where $f : G/U \to X$ corresponds to $f(eU) \in X = F_G(X)$
(details omitted). Hence the element $\gamma$ determines
a well defined map
$$
t : F_G \longrightarrow F
$$
Namely, given $x \in X$ choose $U$ and $f : G/U \to X$ sending
$eU$ to $x$ and then set $t_X(x) = F(f)(\gamma_U)$.
We will show that $t$ induces a bijective map
$t_{G/U} : F_G(G/U) \to F(G/U)$ for any $U$.
This implies in a straightforward manner that $t$
is an isomorphism (details omitted).
Since $|F_G(G/U)| = |F(G/U)|$ it suffices to show
that $t_{G/U}$ is surjective. The image contains at least
one element, namely
$t_{G/U}(eU) = F(\text{id}_{G/U})(\gamma_U) = \gamma_U$.
For $g \in G$ denote $R_g : G/U \to G/U$ right multiplication.
Then set of fixed points of $F(R_g) : F(G/U) \to F(G/U)$
is equal to $F(\emptyset) = \emptyset$ if $g \not \in U$ because $F$
commutes with equalizers. It follows that if
$g_1, \ldots, g_{|G/U|}$ is a system of representatives
for $G/U$, then the elements $F(R_{g_i})(\gamma_U)$ are pairwise distinct
and hence fill out $F(G/U)$. Then
$$
t_{G/U}(g_iU) = F(R_{g_i})(\gamma_U)
$$
and the proof is complete.
\end{proof}

\begin{example}
\label{example-from-C-F-to-G-sets}
Let $\mathcal{C}$ be a category and let $F : \mathcal{C} \to \textit{Sets}$
be a functor such that $F(X)$ is finite for all $X \in \Ob(\mathcal{C})$.
By Lemma \ref{lemma-aut-inverse-limit} we see that $G = \text{Aut}(F)$
comes endowed with the structure of a profinite topological group in a
canonical manner. We obtain a functor
\begin{equation}
\label{equation-remember}
\mathcal{C} \longrightarrow \textit{Finite-}G\textit{-Sets},\quad
X \longmapsto F(X)
\end{equation}
where $F(X)$ is endowed with the induced action of $G$. This action
is continuous by our construction of the topology on $\text{Aut}(F)$.
\end{example}

\noindent
The purpose of defining Galois categories is to single out those
pairs $(\mathcal{C}, F)$ for which the functor (\ref{equation-remember})
is an equivalence. Our definition of a Galois category is as follows.

\begin{definition}
\label{definition-galois-category}
\begin{reference}
Different from the definition in \cite[Expos\'e V, Definition 5.1]{SGA1}.
Compare with \cite[Definition 7.2.1]{BS}.
\end{reference}
Let $\mathcal{C}$ be a category and let $F : \mathcal{C} \to \textit{Sets}$
be a functor. The pair $(\mathcal{C}, F)$ is a {\it Galois category} if
\begin{enumerate}
\item $\mathcal{C}$ has finite limits and finite colimits,
\item
\label{item-connected-components}
every object of $\mathcal{C}$ is a finite (possibly empty)
coproduct of connected objects,
\item $F(X)$ is finite for all $X \in \Ob(\mathcal{C})$, and
\item $F$ reflects isomorphisms\footnote{Namely, given a morphism
$f$ of $\mathcal{C}$ if $F(f)$ is an isomorphism, then
$f$ is an isomorphism.} and is exact\footnote{This means that
$F$ commutes with finite limits and colimits, see
Categories, Section \ref{categories-section-exact-functor}.}.
\end{enumerate}
Here we say $X \in \Ob(\mathcal{C})$ is connected if
it is not initial and for any monomorphism $Y \to X$
either $Y$ is initial or $Y \to X$ is an isomorphism.
\end{definition}

\noindent
{\bf Warning:} This definition is not the same (although eventually we'll
see it is equivalent) as the definition given in most references.
Namely, in \cite[Expos\'e V, Definition 5.1]{SGA1} a Galois category is
defined to be a category equivalent to $\textit{Finite-}G\textit{-Sets}$
for some profinite group $G$. Then Grothendieck characterizes
Galois categories by a list of axioms (G1) -- (G6) which are weaker
than our axioms above. The motivation for our choice is to stress the
existence of finite limits and finite colimits and exactness of the
functor $F$. The price we'll pay for this later is that we'll have
to work a bit harder to apply the results of this section.

\begin{lemma}
\label{lemma-epi-mono}
Let $(\mathcal{C}, F)$ be a Galois category. Let
$X \to Y \in \text{Arrows}(\mathcal{C})$. Then
\begin{enumerate}
\item $F$ is faithful,
\item $X \to Y$ is a monomorphism
$\Leftrightarrow F(X) \to F(Y)$ is injective,
\item $X \to Y$ is an epimorphism
$\Leftrightarrow F(X) \to F(Y)$ is surjective,
\item an object $A$ of $\mathcal{C}$ is initial if and only if
$F(A) = \emptyset$,
\item an object $Z$ of $\mathcal{C}$ is final if and only if
$F(Z)$ is a singleton,
\item if $X$ and $Y$ are connected, then $X \to Y$ is an epimorphism,
\item
\label{item-one-element}
if $X$ is connected and $a, b : X \to Y$ are two morphisms
then $a = b$ as soon as $F(a)$ and $F(b)$ agree on one element of $F(X)$,
\item if $X = \coprod_{i = 1, \ldots, n} X_i$ and
$Y = \coprod_{j = 1, \ldots, m} Y_j$ where $X_i$, $Y_j$ are connected,
then there is map $\alpha : \{1, \ldots, n\} \to \{1, \ldots, m\}$
such that $X \to Y$ comes from a collection of morphisms
$X_i \to Y_{\alpha(i)}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Suppose $a, b : X \to Y$ with $F(a) = F(b)$.
Let $E$ be the equalizer of $a$ and $b$. Then $F(E) = F(X)$
and we see that $E = X$ because $F$ reflects isomorphisms.

\medskip\noindent
Proof of (2). This is true because $F$ turns the morphism $X \to X \times_Y X$
into the map $F(X) \to F(X) \times_{F(Y)} F(X)$ and $F$ reflects isomorphisms.

\medskip\noindent
Proof of (3). This is true because $F$ turns the morphism $Y \amalg_X Y \to Y$
into the map $F(Y) \amalg_{F(X)} F(Y) \to F(Y)$ and $F$ reflects isomorphisms.

\medskip\noindent
Proof of (4). There exists an initial object $A$ and certainly
$F(A) = \emptyset$. On the other hand, if $X$ is an object with
$F(X) = \emptyset$, then the unique map $A \to X$ induces a bijection
$F(A) \to F(X)$ and hence $A \to X$ is an isomorphism.

\medskip\noindent
Proof of (5). There exists a final object $Z$ and certainly
$F(Z)$ is a singleton. On the other hand, if $X$ is an object with
$F(X)$ a singleton, then the unique map $X \to Z$ induces a bijection
$F(X) \to F(Z)$ and hence $X \to Z$ is an isomorphism.

\medskip\noindent
Proof of (6). The equalizer $E$ of the two maps $Y \to Y \amalg_X Y$ is not
an initial object of $\mathcal{C}$ because $X \to Y$ factors through $E$
and $F(X) \not = \emptyset$. Hence $E = Y$ and we conclude.

\medskip\noindent
Proof of (\ref{item-one-element}).
The equalizer $E$ of $a$ and $b$ comes with a monomorphism
$E \to X$ and $F(E) \subset F(X)$ is the set of elements where
$F(a)$ and $F(b)$ agree. To finish use that either $E$ is initial
or $E = X$.

\medskip\noindent
Proof of (8). For each $i, j$ we see that $E_{ij} = X_i \times_Y Y_j$
is either initial or equal to $X_i$. Picking $s \in F(X_i)$
we see that $E_{ij} = X_i$ if and only if $s$ maps to an element
of $F(Y_j) \subset F(Y)$, hence this happens for a unique $j = \alpha(i)$.
\end{proof}

\noindent
By the lemma above we see that, given a connected object $X$ of a
Galois category $(\mathcal{C}, F)$, the automorphism group
$\text{Aut}(X)$ has order at most $|F(X)|$. Namely, given $s \in F(X)$
and $g \in \text{Aut}(X)$ we see that $F(g)(s) = s$ if and only
if $g = \text{id}_X$ by (\ref{item-one-element}).
We say $X$ is {\it Galois} if equality holds.
Equivalently, $X$ is Galois if it is connected and
$\text{Aut}(X)$ acts transitively on $F(X)$.

\begin{lemma}
\label{lemma-galois}
Let $(\mathcal{C}, F)$ be a Galois category. For any connected object $X$
of $\mathcal{C}$ there exists a Galois object $Y$ and a morphism $Y \to X$.
\end{lemma}

\begin{proof}
We will use the results of Lemma \ref{lemma-epi-mono} without further mention.
Let $n = |F(X)|$. Consider $X^n$ endowed with its natural action of
$S_n$. Let
$$
X^n = \coprod\nolimits_{t \in T} Z_t
$$
be the decomposition into connected objects. Pick a $t$ such that
$F(Z_t)$ contains $(s_1, \ldots, s_n)$ with $s_i$ pairwise distinct.
If $(s'_1, \ldots, s'_n) \in F(Z_t)$ is another element, then we
claim $s'_i$ are pairwise distinct as well. Namely, if not, say
$s'_i = s'_j$, then $Z_t$ is the image of an connected component of
$X^{n - 1}$ under the diagonal morphism
$$
\Delta_{ij} : X^{n - 1} \longrightarrow X^n
$$
Since morphisms of connected objects are epimorphisms and induce
surjections after applying $F$ it would follow that $s_i = s_j$
which is not the case.

\medskip\noindent
Let $G \subset S_n$ be the subgroup of elements with $g(Z_t) = Z_t$.
Looking at the action of $S_n$ on
$$
F(X)^n = F(X^n) = \coprod\nolimits_{t' \in T} F(Z_{t'})
$$
we see that $G = \{g \in S_n \mid g(s_1, \ldots, s_n) \in F(Z_t)\}$.
Now pick a second element $(s'_1, \ldots, s'_n) \in F(Z_t)$.
Above we have seen that $s'_i$ are pairwise distinct. Thus we can
find a $g \in S_n$ with $g(s_1, \ldots, s_n) = (s'_1, \ldots, s'_n)$.
In other words, the action of $G$ on $F(Z_t)$ is transitive and
the proof is complete.
\end{proof}

\noindent
Here is a key lemma.

\begin{lemma}
\label{lemma-tame}
\begin{reference}
Compare with \cite[Definition 7.2.4]{BS}.
\end{reference}
Let $(\mathcal{C}, F)$ be a Galois category. Let $G = \text{Aut}(F)$
be as in Example \ref{example-from-C-F-to-G-sets}. For any connected
$X$ in $\mathcal{C}$ the action of $G$ on $F(X)$ is transitive.
\end{lemma}

\begin{proof}
We will use the results of Lemma \ref{lemma-epi-mono} without further mention.
Let $I$ be the set of isomorphism classes of Galois objects in $\mathcal{C}$.
For each $i \in I$ let $X_i$ be a representative of the isomorphism class.
Choose $\gamma_i \in F(X_i)$ for each $i \in I$.
We define a partial ordering on $I$ by setting $i \geq i'$ if
and only if there is a morphism $f_{ii'} : X_i \to X_{i'}$.
Given such a morphism we can post-compose by an automorphism
$X_{i'} \to X_{i'}$ to assure that $F(f_{ii'})(\gamma_i) = \gamma_{i'}$.
With this normalization the morphism $f_{ii'}$ is unique.
Observe that $I$ is a directed partially ordered set:
(Categories, Definition \ref{categories-definition-directed-set})
if $i_1, i_2 \in I$ there exists a Galois object $Y$ and a morphism
$Y \to X_{i_1} \times X_{i_2}$ by Lemma \ref{lemma-galois} applied
to a connected component of $X_{i_1} \times X_{i_2}$.
Then $Y \cong X_i$ for some $i \in I$ and $i \geq i_1$, $i \geq I_2$.

\medskip\noindent
We claim that the functor $F$ is isomorphic to the functor $F'$
which sends $X$ to
$$
F'(X) = \colim_I \Mor_\mathcal{C}(X_i, X)
$$
via the transformation of functors $t : F' \to F$ defined as follows:
given $f : X_i \to X$ we set $t_X(f) = F(f)(\gamma_i)$.
Using (\ref{item-one-element}) we find that $t_X$ is injective.
To show surjectivity, let $\gamma \in F(X)$. Then we can immediately
reduce to the case where $X$ is connected by the definition of
a Galois category. Then we may assume $X$ is Galois by
Lemma \ref{lemma-galois}. In this case $X$ is isomorphic to $X_i$
for some $i$ and we can choose the isomorphism $X_i \to X$ such
that $\gamma_i$ maps to $\gamma$ (by definition of Galois objects).
We conclude that $t$ is an isomorphism.

\medskip\noindent
Set $A_i = \text{Aut}(X_i)$.
We claim that for $i \geq i'$ there is a canonical map
$h_{ii'} : A_i \to A_{i'}$ such that for all $a \in A_i$
the diagram
$$
\xymatrix{
X_i \ar[d]_a \ar[r]_{f_{ii'}} & X_{i'} \ar[d]^{h_{ii'}(a)} \\
X_i \ar[r]^{f_{ii'}} & X_{i'}
}
$$
commutes. Namely, just let $h_{ii'}(a) = a' : X_{i'} \to X_{i'}$
be the unique automorphism such that
$F(a')(\gamma_{i'}) = F(f_{ii'} \circ a)(\gamma_i)$.
As before this makes the diagram commute and moreover the choice
is unique.
It follows that
$h_{i'i''} \circ h_{ii'} = h_{ii''}$
if $i \geq i' \geq i''$.
Since $F(X_i) \to F(X_{i'})$ is surjective we see that
$A_i \to A_{i'}$ is surjective.
Taking the inverse limit we obtain a group
$$
A = \lim_I A_i
$$
This is a profinite group since the automorphism groups are finite.
The map $A \to A_i$ is surjective for all $i$ by
Categories, Lemma \ref{categories-lemma-nonempty-limit}.

\medskip\noindent
Since elements of $A$ act on the inverse system $X_i$ we get an action of
$A$ (on the right) on $F'$ by pre-composing. In other words, we get
a homomorphism $A^{opp} \to G$. Since $A \to A_i$ is surjective we conclude
that $G$ acts transitively on $F(X_i)$ for all $i$. Since every connected
object is dominated by one of the $X_i$ we conclude the lemma is true.
\end{proof}

\begin{proposition}
\label{proposition-galois}
\begin{reference}
This is a weak version of \cite[Expos\'e V]{SGA1}.
The proof is borrowed from \cite[Theorem 7.2.5]{BS}.
\end{reference}
Let $(\mathcal{C}, F)$ be a Galois category. Let $G = \text{Aut}(F)$
be as in Example \ref{example-from-C-F-to-G-sets}. The functor
$F : \mathcal{C} \to \textit{Finite-}G\textit{-Sets}$
(\ref{equation-remember}) an equivalence.
\end{proposition}

\begin{proof}
We will use the results of Lemma \ref{lemma-epi-mono} without further mention.
In particular we know the functor is faithful.
By Lemma \ref{lemma-tame} we know that for any connected $X$ the
action of $G$ on $F(X)$ is transitive. Hence for general $X$ the functor
$F$ sends the connected components of $X$ (which exist by
an axiom of a Galois category) to the $G$-orbits of $F(X)$.
Let $X$ and $Y$ be objects and let
$s : F(X) \to F(Y)$ be a map. Then the graph
$\Gamma_s \subset F(X) \times F(Y)$ of $s$
is a union of connected components. Hence there exists a
union of connected components $Z$ of $X \times Y$,
which comes equipped with a monomorphism $Z \to X \times Y$,
with $F(Z) = \Gamma_s$. Since $F(Z) \to F(X)$ is bijective
we see that $Z \to X$ is an isomorphism and we conclude
that $s = F(f)$ where $f : X \cong Z \to Y$ is the composition.
Hence $F$ is fully faithful.

\medskip\noindent
To finish the proof we show that $F$ is essentially surjective.
It suffices to show that $G/H$ is in the essential image for
any open subgroup $H \subset G$ of finite index.
By definition of the topology on $G$ there exists a finite
collection of objects $X_i$ such that
$$
\Ker(G \longrightarrow \prod\nolimits_i \text{Aut}(F(X_i)))
$$
is contained in $H$. We may assume $X_i$ is connected
for all $i$. We can choose a Galois object $Y$ mapping
to a connected component of $\prod X_i$ using
Lemma \ref{lemma-galois}. Choose an isomorphism $F(Y) = G/U$
in $G\textit{-sets}$ for some open subgroup $U \subset G$.
As $Y$ is Galois, the group
$\text{Aut}(Y) = \text{Aut}_{G\textit{-Sets}}(G/U)$ acts transitively
on $F(Y) = G/U$. This implies that $U$ is normal. Since
$F(Y)$ surjects onto $F(X_i)$ for each $i$ we see that
$U \subset H$. Let $M \subset \text{Aut}(Y)$ be the finite subgroup
corresponding to
$$
(H/U)^{opp} \subset (G/U)^{opp} = \text{Aut}_{G\textit{-Sets}}(G/U)
= \text{Aut}(Y).
$$
Set $X = Y/M$, i.e., $X$ is the coequalizer
of the arrows $m : Y \to Y$, $m \in M$.
Since $F$ is exact we see that $F(X) = G/H$ and the
proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-functoriality-galois}
Let $(\mathcal{C}, F)$ and $(\mathcal{C}', F')$ be Galois categories.
Let $H : \mathcal{C} \to \mathcal{C}'$ be an exact functor.
There exists an isomorphism $t : F' \circ H \to F$.
The choice of $t$ determines a continuous homomorphism
$h : G' = \text{Aut}(F') \to \text{Aut}(F) = G$ and
a $2$-commutative diagram
$$
\xymatrix{
\mathcal{C} \ar[r]_H \ar[d] & \mathcal{C}' \ar[d] \\
\textit{Finite-}G\textit{-Sets} \ar[r]^h &
\textit{Finite-}G'\textit{-Sets}
}
$$
The map $h$ is independent of $t$ up
to an inner automorphism of $G$.
Conversely, given a continuous homomorphism $h : G' \to G$ there
is an exact functor $H : \mathcal{C} \to \mathcal{C}'$ and an
isomorphism $t$ recovering $h$ as above.
\end{lemma}

\begin{proof}
By Proposition \ref{proposition-galois} and
Lemma \ref{lemma-single-out-profinite} we may assume
$\mathcal{C} = \textit{Finite-}G\textit{-Sets}$ and $F$ is the
forgetful functor and similarly for $\mathcal{C}'$. Thus the existence of
$t$ follows from Lemma \ref{lemma-second-fundamental-functor}. The map $h$
comes from transport of structure via $t$. The commutativity of the
diagram is obvious. Uniqueness of $h$ up to inner conjugation by
an element of $G$ comes from the fact that the choice of $t$ is
unique up to an element of $G$. The final statement is straightforward.
\end{proof}





\section{Functors and homomorphisms}
\label{section-translation}

\noindent
Let $(\mathcal{C}, F)$, $(\mathcal{C}', F')$, $(\mathcal{C}'', F'')$
be Galois categories. Set $G = \text{Aut}(F)$, $G' = \text{Aut}(F')$, and
$G'' = \text{Aut}(F'')$. Let $H : \mathcal{C} \to \mathcal{C}'$
and $H' : \mathcal{C}' \to \mathcal{C}''$ be exact functors.
Let $h : G' \to G$ and $h' : G'' \to G'$ be the corresponding
continuous homomorphism as in Lemma \ref{lemma-functoriality-galois}.
In this section we consider the corresponding $2$-commutative diagram
\begin{equation}
\label{equation-translation}
\vcenter{
\xymatrix{
\mathcal{C} \ar[r]_H \ar[d] &
\mathcal{C}' \ar[r]_{H'} \ar[d] &
\mathcal{C}'' \ar[d] \\
\textit{Finite-}G\textit{-Sets} \ar[r]^h &
\textit{Finite-}G'\textit{-Sets} \ar[r]^{h'} &
\textit{Finite-}G''\textit{-Sets}
}
}
\end{equation}
and we relate exactness properties of the sequence
$1 \to G'' \to G' \to G \to 1$ to properties of the functors $H$ and $H'$.

\begin{lemma}
\label{lemma-functoriality-galois-surjective}
In diagram (\ref{equation-translation}) the following are equivalent
\begin{enumerate}
\item $h : G' \to G$ is surjective,
\item $H : \mathcal{C} \to \mathcal{C}'$ is fully faithful,
\item if $X \in \Ob(\mathcal{C})$ is connected, then $H(X)$ is connected,
\item if $X \in \Ob(\mathcal{C})$ is connected and there is
a morphism $*' \to H(X)$ in $\mathcal{C}'$, then
there is a morphism $* \to X$, and
\item for any object $X$ of $\mathcal{C}$ the map
$\Mor_\mathcal{C}(*, X) \to \Mor_{\mathcal{C}'}(*', H(X))$
is bijective.
\end{enumerate}
Here $*$ and $*'$ are final objects of $\mathcal{C}$ and $\mathcal{C}'$.
\end{lemma}

\begin{proof}
The implications (5) $\Rightarrow$ (4) and (2) $\Rightarrow$ (5) are clear.

\medskip\noindent
Assume (3). Let $X$ be a connected object of $\mathcal{C}$ and let
$*' \to H(X)$ be a morphism. Since $H(X)$ is connected by (3)
we see that $*' \to H(X)$ is an isomorphism. Hence the $G'$-set
corresponding to $H(X)$ has exactly one element, which means the
$G$-set corresponding to $X$ has one element which means $X$ is
isomorphic to the final object of $\mathcal{C}$, in particular
there is a map $* \to X$. In this way we see that (3) $\Rightarrow$ (4).

\medskip\noindent
If (1) is true, then the functor
$\textit{Finite-}G\textit{-Sets} \to \textit{Finite-}G'\textit{-Sets}$
is fully faithful: in this case a map of $G$-sets commutes with the
action of $G$ if and only if it commutes with the action of $G'$.
Thus (1) $\Rightarrow$ (2).

\medskip\noindent
If (1) is true, then for a $G$-set $X$ the $G$-orbits and $G'$-orbits
agree. Thus (1) $\Rightarrow$ (3).

\medskip\noindent
To finish the proof it suffices to show that (4) implies (1).
If (1) is false, i.e., if $h$ is not surjective, then there is
an open subgroup $U \subset G$ containing $h(G')$ which is not
equal to $G$. Then the finite $G$-set $M = G/U$ has a transitive
action but $G'$ has a fixed point. The object $X$ of $\mathcal{C}$
corresponding to $M$ would contradict (3). In this way we see that
(3) $\Rightarrow$ (1) and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-composition-trivial}
In diagram (\ref{equation-translation}) the following are equivalent
\begin{enumerate}
\item $h \circ h'$ is trivial, and
\item the image of $H' \circ H$ consists of objects isomorphic to finite
coproducts of final objects.
\end{enumerate}
\end{lemma}

\begin{proof}
We may replace $H$ and $H'$ by the canonical functors
$\textit{Finite-}G\textit{-Sets} \to \textit{Finite-}G'\textit{-Sets}
\to \textit{Finite-}G''\textit{-Sets}$ determined by $h$ and $h'$.
Then we are saying that the action of $G''$ on every $G$-set is trivial
if and only if the homomorphism $G'' \to G$ is trivial. This is clear.
\end{proof}

\begin{lemma}
\label{lemma-functoriality-galois-ses}
In diagram (\ref{equation-translation}) the following are equivalent
\begin{enumerate}
\item the sequence $G'' \xrightarrow{h'} G' \xrightarrow{h} G \to 1$
is exact in the following sense: $h$ is surjective, $h \circ h'$ is trivial,
and $\Ker(h)$ is the smallest closed normal subgroup containing $\Im(h')$,
\item $H$ is fully faithful and an object $X'$ of $\mathcal{C}'$ is in
the essential image of $H$ if and only if $H'(X')$ is isomorphic to a
finite coproduct of final objects, and
\item $H$ is fully faithful, $H \circ H'$ sends every object to a finite
coproduct of final objects, and for an object $X'$ of $\mathcal{C}'$
such that $H'(X')$ is a finite coproduct of final objects there exists
an object $X$ of $\mathcal{C}$ and an epimorphism $H(X) \to X'$.
\end{enumerate}
\end{lemma}

\begin{proof}
By Lemmas \ref{lemma-functoriality-galois-surjective} and
\ref{lemma-composition-trivial} we may assume that
$H$ is fully faithful, $h$ is surjective, $H' \circ H$ maps
objects to disjoint unions of the final object, and $h \circ h'$
is trivial. Let $N \subset G'$ be the smallest closed normal
subgroup containing the image of $h'$. It is clear that
$N \subset \Ker(h)$.
We may assume the functors $H$ and $H'$ are the canonical functors
$\textit{Finite-}G\textit{-Sets} \to \textit{Finite-}G'\textit{-Sets}
\to \textit{Finite-}G''\textit{-Sets}$ determined by $h$ and $h'$.

\medskip\noindent
Suppose that (2) holds. This means that for a finite $G'$-set $X'$
such that $G''$ acts trivially, the action of $G'$ factors through $G$.
Apply this to $X' = G'/U'N$ where $U'$ is a small open subgroup of $G'$.
Then we see that $\Ker(h) \subset U'N$ for all $U'$. Since $N$ is closed
this implies $\Ker(h) \subset N$, i.e., (1) holds.

\medskip\noindent
Suppose that (1) holds. This means that $N = \Ker(h)$. Let $X'$ be a
finite $G'$-set such that $G''$ acts trivially. This means that
$\Ker(G' \to \text{Aut}(X'))$ is a closed normal subgroup containing
$\Im(h')$. Hence $N = \Ker(h)$ is contained in it and the $G'$-action
on $X'$ factors through $G$, i.e., (2) holds.

\medskip\noindent
Suppose that (3) holds. This means that for a finite $G'$-set $X'$
such that $G''$ acts trivially, there is a surjection of $G'$-sets
$X \to X'$ where $X$ is a $G$-set. Clearly this means the action of
$G'$ on $X'$ factors through $G$, i.e., (2) holds.

\medskip\noindent
The implication (2) $\Rightarrow$ (3) is immediate. This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-functoriality-galois-injective}
In diagram (\ref{equation-translation}) the following are equivalent
\begin{enumerate}
\item $h'$ is injective, and
\item for every connected object $X''$ of $\mathcal{C}''$
there exists an object $X'$ of $\mathcal{C}'$ and a diagram
$$
X'' \leftarrow Y'' \rightarrow H(X')
$$
in $\mathcal{C}''$ where $Y'' \to X''$ is an epimorphism and
$Y'' \to H(X')$ is a monomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
We may replace $H'$ by the corresponding functor between the categories
of finite $G'$-sets and finite $G''$-sets.

\medskip\noindent
Assume $h' : G'' \to G'$ is injective. Let $H'' \subset G''$
be an open subgroup. Since the topology on $G''$ is the induced
topology from $G'$ there exists an open subgroup $H' \subset G'$
such that $(h')^{-1}(H') \subset H''$.
Then the desired diagram is
$$
G''/H'' \leftarrow G''/(h')^{-1}(H') \rightarrow G'/H'
$$
Conversely, assume (2) holds for the functor
$\textit{Finite-}G'\textit{-Sets} \to \textit{Finite-}G''\textit{-Sets}$.
Let $g'' \in \Ker(h')$. Pick any open subgroup $H'' \subset G''$.
By assumption there exists a finite $G'$-set $X'$ and a diagram
$$
G''/H'' \leftarrow Y'' \rightarrow X'
$$
of $G''$-sets with the left arrow surjective and the right arrow injective.
Since $g''$ is in the kernel of $h'$ we see that $g''$ acts trivially on $X'$.
Hence $g''$ acts trivially on $Y''$ and hence trivially on $G''/H''$.
Thus $g'' \in H''$. As this holds for all open subgroups we conclude
that $g''$ is the identity element as desired.
\end{proof}

\begin{lemma}
\label{lemma-functoriality-galois-normal}
In diagram (\ref{equation-translation}) the following are equivalent
\begin{enumerate}
\item the image of $h'$ is normal, and
\item for every connected object $X'$ of $\mathcal{C}'$ such that
there is a morphism from the final object of $\mathcal{C}''$
to $H'(X')$ we have that $H'(X')$ is isomorphic to a finite coproduct
of final objects.
\end{enumerate}
\end{lemma}

\begin{proof}
This translates into the following statement for the continuous
group homomorphism $h' : G'' \to G'$: the image of $h'$ is normal
if and only if every open subgroup $U' \subset G'$ which
contains $h'(G'')$ also contains every conjugate of $h'(G'')$.
The result follows easily from this; some details omitted.
\end{proof}






\section{Finite \'etale morphisms}
\label{section-finite-etale}

\noindent
In this section we prove enough basic results on finite \'etale
morphisms to be able to construct the \'etale fundamental group.

\medskip\noindent
Let $X$ be a scheme. We will use the notation $\textit{F\'Et}_X$
to denote the category of schemes finite and \'etale over $X$.
Thus
\begin{enumerate}
\item an object of $\textit{F\'Et}_X$ is a finite \'etale morphism
$Y \to X$ with target $X$, and
\item a morphism in $\textit{F\'Et}_X$
from $Y \to X$ to $Y' \to X$ is a morphism $Y \to Y'$ making
the diagram
$$
\xymatrix{
Y \ar[rr] \ar[rd] & &  Y' \ar[ld] \\
& X
}
$$
commute.
\end{enumerate}
We will often call an object of $\textit{F\'Et}_X$ a
{\it finite \'etale cover} of $X$ (even if $Y$ is empty).
It turns out that there is a stack $p : \textit{F\'Et} \to \Sch$
over the category of schemes whose fibre over $X$ is the category
$\textit{F\'Et}_X$ just defined. See Examples of Stacks, Section
\ref{examples-stacks-section-finite-etale}.

\begin{example}
\label{example-finite-etale-geometric-point}
Let $k$ be an algebraically closed field and $X = \Spec(k)$. In this case
$\textit{F\'Et}_X$ is equivalent to the category of finite sets. This works
more generally when $k$ is separably algebraically closed. The reason is
that a scheme \'etale over $k$ is the disjoint union of spectra of
fields finite separable over $k$, see
Morphisms, Lemma \ref{morphisms-lemma-etale-over-field}.
\end{example}

\begin{lemma}
\label{lemma-finite-etale-covers-limits-colimits}
Let $X$ be a scheme. The category $\textit{F\'Et}_X$ has finite limits and
finite colimits and for any morphism $X' \to X$ the base change functor
$\textit{F\'Et}_X \to \textit{F\'Et}_{X'}$ is exact.
\end{lemma}

\begin{proof}
Finite limits and left exactness. By
Categories, Lemma \ref{categories-lemma-finite-limits-exist}
it suffices to show that $\textit{F\'Et}_X$ has a final object
and fibred products. This is clear because the category of
all schemes over $X$ has a final object (namely $X$) and fibred products.
Also, fibred products of schemes finite \'etale over $X$ are
finite \'etale over $X$. Moreover, it is clear that base
change commutes with these operations and hence base change
is left exact (Categories, Lemma
\ref{categories-lemma-characterize-left-exact}).

\medskip\noindent
Finite colimits and right exactness. By
Categories, Lemma \ref{categories-lemma-colimits-exist}
it suffices to show that $\textit{F\'Et}_X$ has finite
coproducts and coequalizers. Finite coproducts are given
by disjoint unions (the empty coproduct is the empty scheme).
Let $a, b : Z \to Y$ be two morphisms of $\textit{F\'Et}_X$.
Since $Z \to X$ and $Y \to X$ are finite \'etale we can write
$Z = \underline{\Spec}(\mathcal{C})$ and $Y = \underline{\Spec}(\mathcal{B})$
for some finite locally free $\mathcal{O}_X$-algebras $\mathcal{C}$
and $\mathcal{B}$. The morphisms $a, b$ induce two maps
$a^\sharp, b^\sharp : \mathcal{B} \to \mathcal{C}$.
Let $\mathcal{A} = \text{Eq}(a^\sharp, b^\sharp)$ be their
equalizer. If
$$
\underline{\Spec}(\mathcal{A}) \longrightarrow X
$$
is finite \'etale, then it is clear that this is the coequalizer
(after all we can write any object of $\textit{F\'Et}_X$
as the relative spectrum of a sheaf of $\mathcal{O}_X$-algebras).
This we may do after replacing $X$ by the members of an \'etale
covering (Descent, Lemmas \ref{descent-lemma-descending-property-finite}
and \ref{descent-lemma-descending-property-etale}).
Thus by \'Etale Morphisms, Lemma \ref{etale-lemma-finite-etale-etale-local}
we may assume that
$Y = \coprod_{i = 1, \ldots, n} X$ and $Z = \coprod_{j = 1, \ldots, m} X$.
Then
$$
\mathcal{C} = \prod\nolimits_{1 \leq j \leq m} \mathcal{O}_X
\quad\text{and}\quad
\mathcal{B} = \prod\nolimits_{1 \leq i \leq n} \mathcal{O}_X
$$
After a further replacement by the members of an open covering
we may assume that $a, b$ correspond to
maps $a_s, b_s : \{1, \ldots, m\} \to \{1, \ldots, n\}$, i.e.,
the summand $X$ of $Z$ corresponding to the index $j$ maps into
the summand $X$ of $Y$ corresponding to the index $a_s(j)$, resp.\ $b_s(j)$
under the morphism $a$, resp.\ $b$.
Let $\{1, \ldots, n\} \to T$ be the coequalizer of $a_s, b_s$.
Then we see that
$$
\mathcal{A} = \prod\nolimits_{t \in T} \mathcal{O}_X
$$
whose spectrum is certainly finite \'etale over $X$. We
omit the verification that this is compatible with base change.
Thus base change is a right exact functor.
\end{proof}

\begin{remark}
\label{remark-colimits-commute-forgetful}
Let $X$ be a scheme. Consider the natural functors
$F_1 : \textit{F\'Et}_X \to \Sch$ and $F_2 : \textit{F\'Et}_X \to \Sch/X$.
Then
\begin{enumerate}
\item The functors $F_1$ and $F_2$ commute with finite colimits.
\item The functor $F_2$ commutes with finite limits,
\item The functor $F_1$ commutes with connected finite limits, i.e.,
with equalizers and fibre products.
\end{enumerate}
The results on limits are immediate from the discussion in
the proof of Lemma \ref{lemma-finite-etale-covers-limits-colimits}
and Categories, Lemma \ref{categories-lemma-connected-limit-over-X}.
It is clear that $F_1$ and $F_2$ commute with finite coproducts.
By the dual of Categories, Lemma
\ref{categories-lemma-characterize-left-exact}
we need to show that $F_1$ and $F_2$ commute with coequalizers.
In the proof of Lemma \ref{lemma-finite-etale-covers-limits-colimits}
we saw that coequalizers in $\textit{F\'Et}_X$ look \'etale locally
like this
$$
\xymatrix{
\coprod_{j \in J} U \ar@<1ex>[r]^a \ar@<-1ex>[r]_b &
\coprod_{i \in I} U \ar[r] &
\coprod_{t \in \text{Coeq}(a, b)} U
}
$$
which is certainly a coequalizer in the category of schemes.
Hence the statement follows from the fact that being a coequalizer
is fpqc local as formulated precisely in
Descent, Lemma \ref{descent-lemma-coequalizer-fpqc-local}.
\end{remark}

\begin{lemma}
\label{lemma-internal-hom-finite-etale}
Let $X$ be a scheme. Given $U, V$ finite \'etale over $X$ there
exists a scheme $W$ finite \'etale over $X$ such that
$$
\Mor_X(X, W) = \Mor_X(U, V)
$$
and such that the same remains true after any base change.
\end{lemma}

\begin{proof}
By More on Morphisms, Lemma
\ref{more-morphisms-lemma-hom-from-finite-locally-free-separated-lqf}
there exists a scheme $W$ representing $\mathit{Mor}_X(U, V)$.
(Use that an \'etale morphism is locally quasi-finite by
Morphisms, Lemmas \ref{morphisms-lemma-etale-locally-quasi-finite}
and that a finite morphism is separated.)
This scheme clearly satisfies the formula after any base change.
To finish the proof we have to show that $W \to X$ is finite \'etale.
This we may do after replacing $X$ by the members of an \'etale
covering (Descent, Lemmas \ref{descent-lemma-descending-property-finite}
and \ref{descent-lemma-descending-property-separated}).
Thus by \'Etale Morphisms, Lemma \ref{etale-lemma-finite-etale-etale-local}
we may assume that $U = \coprod_{i = 1, \ldots, n} X$
and $V = \coprod_{j = 1, \ldots, m} X$.
In this case
$W = \coprod_{\alpha : \{1, \ldots, n\} \to \{1, \ldots, m\}} X$
by inspection (details omitted) and the proof is complete.
\end{proof}

\noindent
Let $X$ be a scheme. A {\it geometric point} of $X$ is a morphism
$\Spec(k) \to X$ where $k$ is algebraically closed. Such a point is
usually denoted $\overline{x}$, i.e., by an overlined small case letter.
We often use $\overline{x}$ to denote the scheme $\Spec(k)$ as well as
the morphism, and we use $\kappa(\overline{x})$
to denote $k$. We say $\overline{x}$ {\it lies over} $x$
to indicate that $x \in X$ is the image of $\overline{x}$.
We will discuss this further in
\'Etale Cohomology, Section \ref{etale-cohomology-section-stalks}.
Given $\overline{x}$ and an \'etale morphism $U \to X$ we can
consider
$$
|U_{\overline{x}}| : \text{the underlying set of points of the
scheme }U_{\overline{x}} = U \times_X \overline{x}
$$
Since $U_{\overline{x}}$ as a scheme over $\overline{x}$
is a disjoint union of copies of $\overline{x}$
(Morphisms, Lemma \ref{morphisms-lemma-etale-over-field})
we can also describe this set as
$$
|U_{\overline{x}}| =
\left\{
\begin{matrix}
\text{commutative} \\
\text{diagrams}
\end{matrix}
\vcenter{
\xymatrix{
\overline{x} \ar[rd]_{\overline{x}} \ar[r]_{\overline{u}} & U \ar[d] \\
& X
}
}
\right\}
$$
The assignment $U \mapsto |U_{\overline{x}}|$ is a functor
which is often denoted $F_{\overline{x}}$.

\begin{lemma}
\label{lemma-finite-etale-connected-galois-category}
Let $X$ be a connected scheme. Let $\overline{x}$ be a geometric point.
The functor
$$
F_{\overline{x}} : \textit{F\'Et}_X \longrightarrow \textit{Sets},\quad
Y \longmapsto |Y_{\overline{x}}|
$$
defines a Galois category (Definition \ref{definition-galois-category}).
\end{lemma}

\begin{proof}
After identifying $\textit{F\'Et}_{\overline{x}}$ with the category of
finite sets (Example \ref{example-finite-etale-geometric-point})
we see that our functor $F_{\overline{x}}$
is nothing but the base change functor for the morphism $\overline{x} \to X$.
Thus we see that $\textit{F\'Et}_X$ has finite limits and finite colimits
and that $F_{\overline{x}}$ is exact by
Lemma \ref{lemma-finite-etale-covers-limits-colimits}.
We will also use that finite limits in $\textit{F\'Et}_X$
agree with the corresponding finite limits in the category
of schemes over $X$, see Remark \ref{remark-colimits-commute-forgetful}.

\medskip\noindent
If $Y' \to Y$ is a monomorphism in $\textit{F\'Et}_X$
then we see that $Y' \to Y' \times_Y Y'$ is an isomorphism, and
hence $Y' \to Y$ is a monomorphism of schemes. It follows that
$Y' \to Y$ is an open immersion
(\'Etale Morphisms, Theorem \ref{etale-theorem-etale-radicial-open}). Since
$Y'$ is finite over $X$ and $Y$ separated over $X$,
the morphism $Y' \to Y$ is finite
(Morphisms, Lemma \ref{morphisms-lemma-finite-permanence}), hence closed
(Morphisms, Lemma \ref{morphisms-lemma-finite-proper}),
hence it is the inclusion of an open and closed subscheme of $Y$.
It follows that $Y$ is a connected objects of the category
$\textit{F\'Et}_X$ (as in Definition \ref{definition-galois-category})
if and only if $Y$ is connected as a scheme. Then it follows from
Topology, Lemma \ref{topology-lemma-finite-fibre-connected-components}
that $Y$ is a finite coproduct of its connected components
both as a scheme and in the sense of
Definition \ref{definition-galois-category}.

\medskip\noindent
Let $Y \to Z$ be a morphism in $\textit{F\'Et}_X$ which induces a
bijection $F_{\overline{x}}(Y) \to F_{\overline{x}}(Z)$. We have to
show that $Y \to Z$ is an isomorphism. By the above we may assume
$Z$ is connected. Since $Y \to Z$ is finite \'etale and hence finite
locally free it suffices to show that $Y \to Z$ is finite locally
free of degree $1$. This is true in a neighbourhood of any point of
$Z$ lying over $\overline{x}$ and since $Z$ is connected and
the degree is locally constant we conclude.
\end{proof}



\section{Fundamental groups}
\label{section-fundamental-groups}

\noindent
In this section we define Grothendieck's algebraic fundamental group.
The following definition makes sense thanks to
Lemma \ref{lemma-finite-etale-connected-galois-category}.

\begin{definition}
\label{definition-fundamental-group}
Let $X$ be a connected scheme. Let $\overline{x}$ be a geometric point
of $X$. The {\it fundamental group} of $X$ with
{\it base point} $\overline{x}$ is the group
$$
\pi_1(X, \overline{x}) = \text{Aut}(F_{\overline{x}})
$$
of automorphisms of the fibre functor
$F_{\overline{x}} : \textit{F\'Et}_X \to \textit{Sets}$
endowed with its canonical profinite topology from
Lemma \ref{lemma-aut-inverse-limit}.
\end{definition}

\noindent
Combining the above with the material from Section \ref{section-galois}
we obtain the following theorem.

\begin{theorem}
\label{theorem-fundamental-group}
Let $X$ be a connected scheme. Let $\overline{x}$ be a geometric point
of $X$.
\begin{enumerate}
\item The fibre functor $F_{\overline{x}}$ defines an equivalence of
categories
$$
\textit{F\'Et}_X \longrightarrow
\textit{Finite-}\pi_1(X, \overline{x})\textit{-Sets}
$$
\item Given a second geometric point $\overline{x}'$ of $X$ there
exists an isomorphism $t : F_{\overline{x}} \to F_{\overline{x}'}$.
This gives an isomorphism $\pi_1(X, \overline{x}) \to \pi_1(X, \overline{x}')$
compatible with the equivalences in (1). This isomorphism is
independent of $t$ up to inner conjugation.
\item Given a morphism $f : X \to Y$ of connected schemes denote
$\overline{y} = f \circ \overline{x}$. There is a canonical
continuous homomorphism
$$
f_* : \pi_1(X, \overline{x}) \to \pi_1(Y, \overline{y})
$$
such that the diagram
$$
\xymatrix{
\textit{F\'Et}_Y \ar[r]_{\text{base change}} \ar[d]_{F_{\overline{y}}} &
\textit{F\'Et}_X \ar[d]^{F_{\overline{x}}} \\
\textit{Finite-}\pi_1(Y, \overline{y})\textit{-Sets} \ar[r]^{f_*} &
\textit{Finite-}\pi_1(X, \overline{x})\textit{-Sets}
}
$$
is commutative.
\end{enumerate}
\end{theorem}

\begin{proof}
Part (1) follows from Lemma \ref{lemma-finite-etale-connected-galois-category}
and Proposition \ref{proposition-galois}.
Part (2) is a special case of Lemma \ref{lemma-functoriality-galois}.
For part (3) observe that the diagram
$$
\xymatrix{
\textit{F\'Et}_Y \ar[r] \ar[d]_{F_{\overline{y}}} &
\textit{F\'Et}_X \ar[d]^{F_{\overline{x}}} \\
\textit{Sets} \ar@{=}[r] & \textit{Sets}
}
$$
is commutative (actually commutative, not just $2$-commutative) because
$\overline{y} = f \circ \overline{x}$. Hence
we can apply Lemma \ref{lemma-functoriality-galois} with the implied
transformation of functors to get (3).
\end{proof}

\begin{lemma}
\label{lemma-fundamental-group-Galois-group}
Let $K$ be a field and set $X = \Spec(K)$. Let $\overline{K}$ be an
algebraic closure and denote $\overline{x} : \Spec(\overline{K}) \to X$
the corresponding geometric point. Let $K^{sep} \subset \overline{K}$
be the separable algebraic closure.
\begin{enumerate}
\item The functor of Lemma \ref{lemma-sheaves-point} induces an equivalence
$$
\textit{F\'Et}_X \longrightarrow
\textit{Finite-}\text{Gal}(K^{sep}/K)\textit{-Sets}.
$$
compatible with $F_{\overline{x}}$ and the functor
$\textit{Finite-}\text{Gal}(K^{sep}/K)\textit{-Sets} \to \textit{Sets}$.
\item This induces a canonical isomorphism
$$
\text{Gal}(K^{sep}/K) \longrightarrow \pi_1(X, \overline{x})
$$
of profinite topological groups.
\end{enumerate}
\end{lemma}

\begin{proof}
The functor of Lemma \ref{lemma-sheaves-point} is the same as the functor
$F_{\overline{x}}$ because for any $Y$ \'etale over $X$ we have
$$
\Mor_X(\Spec(\overline{K}), Y) = \Mor_X(\Spec(K^{sep}), Y)
$$
Namely, as seen in the proof of Lemma \ref{lemma-sheaves-point} we have
$Y = \coprod_{i \in I} \Spec(L_i)$ with $L_i/K$ finite separable over $K$.
Hence any $K$-algebra homomorphism $L_i \to \overline{K}$ factors
through $K^{sep}$. Also, note that $F_{\overline{x}}(Y)$ is finite
if and only if $I$ is finite if and only if $Y \to X$ is finite \'etale.
This proves (1).

\medskip\noindent
Part (2) is a formal consequence of (1),
Lemma \ref{lemma-functoriality-galois}, and
Lemma \ref{lemma-single-out-profinite}.
(Please also see the remark below.)
\end{proof}

\begin{remark}
\label{remark-variance}
In the situation of Lemma \ref{lemma-fundamental-group-Galois-group}
let us give a more explicit construction of the isomorphism
$\text{Gal}(K^{sep}/K) \to
\pi_1(X, \overline{x}) = \text{Aut}(F_{\overline{x}})$.
Observe that
$\text{Gal}(K^{sep}/K) = \text{Aut}(\overline{K}/K)$
as $\overline{K}$ is the perfection of $K^{sep}$.
Since $F_{\overline{x}}(Y) = \Mor_X(\Spec(\overline{K}), Y)$
we may consider the map
$$
\text{Aut}(\overline{K}/K) \times F_{\overline{x}}(Y) \to F_{\overline{x}}(Y),
\quad
(\sigma, \overline{y}) \mapsto
\sigma \cdot \overline{y} = \overline{y} \circ \Spec(\sigma)
$$
This is an action because
$$
\sigma\tau \cdot \overline{y} =
\overline{y} \circ \Spec(\sigma\tau) =
\overline{y} \circ \Spec(\tau) \circ \Spec(\sigma) =
\sigma \cdot (\tau \cdot \overline{y})
$$
The action is functorial in $Y \in \textit{F\'Et}_X$ and we
obtain the desired map.
\end{remark}





\section{Galois covers of connected schemes}
\label{section-finite-etale-under-galois}

\noindent
Let $X$ be a connected scheme with geometric point $\overline{x}$.
Since $F_{\overline{x}} : \textit{F\'Et}_X \to \textit{Sets}$ is a
Galois category (Lemma \ref{lemma-finite-etale-connected-galois-category})
the material in Section \ref{section-galois} applies.
In this section we explicitly transfer some of the terminology
and results to the setting of schemes and finite \'etale morphisms.

\medskip\noindent
We will say a finite \'etale morphism $Y \to X$ is a
{\it Galois cover} if $Y$ defines a Galois object of
$\textit{F\'Et}_X$.
For a finite \'etale morphism $Y \to X$ with $G = \text{Aut}_X(Y)$
the following are equivalent
\begin{enumerate}
\item $Y$ is a Galois cover of $X$,
\item $Y$ is connected and $|G|$ is equal to the degree of $Y \to X$,
\item $Y$ is connected and $G$ acts transitively on $F_{\overline{x}}(Y)$, and
\item $Y$ is connected and $G$ acts simply transitively on
$F_{\overline{x}}(Y)$.
\end{enumerate}
This follows immediately from the discussion in Section \ref{section-galois}.

\medskip\noindent
For any finite \'etale morphism $f : Y \to X$ with $Y$ connected,
there is a finite \'etale Galois cover $Y' \to X$ which dominates $Y$
(Lemma \ref{lemma-galois}).

\medskip\noindent
The Galois objects of $\textit{F\'Et}_X$ correspond, via the equivalence
$$
F_{\overline{x}} : \textit{F\'Et}_X \to
\textit{Finite-}\pi_1(X, \overline{x})\textit{-Sets}
$$
of Theorem \ref{theorem-fundamental-group},
with the finite $\pi_1(X, \overline{x})\textit{-Sets}$
of the form $G = \pi_1(X, \overline{x})/H$ where $H$ is a
normal open subgroup. Equivalently, if $G$ is a finite group
and $\pi_1(X, \overline{x}) \to G$ is a continuous surjection,
then $G$ viewed as a $\pi_1(X, \overline{x})$-set corresponds
to a Galois covering.

\medskip\noindent
If $Y_i \to X$, $i = 1, 2$ are finite \'etale Galois covers
with Galois groups $G_i$, then there exists a finite \'etale
Galois cover $Y \to X$ whose Galois group is a subgroup of
$G_1 \times G_2$. Namely, take the corresponding continuous
homomorphisms $\pi_1(X, \overline{x}) \to G_i$ and
let $G$ be the image of the induced continuous homomorphism
$\pi_1(X, \overline{x}) \to G_1 \times G_2$.









\section{Topological invariance of the fundamental group}
\label{section-topological-invariance}

\noindent
The main result of this section is that a universal homeomorphism
of connected schemes induces an isomorphism on fundamental groups.
See Proposition \ref{proposition-universal-homeomorphism}.

\medskip\noindent
Instead of directly proving two schemes have the same fundamental
group, we often prove that their categories of finite \'etale
coverings are the same. This of course implies that
their fundamental groups are equal provided they are connected.

\begin{lemma}
\label{lemma-what-equivalence-gives}
Let $f : X \to Y$ be a morphism of quasi-compact and quasi-separated schemes
such that the base change functor $\textit{F\'Et}_Y \to \textit{F\'Et}_X$
is an equivalence of categories. In this case
\begin{enumerate}
\item $f$ induces a homeomorphism $\pi_0(X) \to \pi_0(Y)$,
\item if $X$ or equivalently $Y$ is connected, then
$\pi_1(X, \overline{x}) = \pi_1(Y, \overline{y})$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $Y = Y_0 \amalg Y_1$ be a decomposition into nonempty open and closed
subschemes. We claim that $f(X)$ meets both $Y_i$. Namely, if not,
say $f(X) \subset Y_1$, then we can consider the finite \'etale
morphism $V = Y_1 \to Y$. This is not an
isomorphism but $V \times_Y X \to X$ is an isomorphism, which is
a contradiction.

\medskip\noindent
Suppose that $X = X_0 \amalg X_1$ is a decomposition into open and closed
subschemes. Consider the finite \'etale morphism $U = X_1 \to X$. Then
$U = X \times_Y V$ for some finite \'etale morphism $V \to Y$. The degree
of the morphism $V \to Y$ is locally constant, hence we obtain a decomposition
$Y = \coprod_{d \geq 0} Y_d$ into open and closed subschemes
such that $V \to Y$ has degree $d$ over $Y_d$. Since
$f^{-1}(Y_d) = \emptyset$ for $d > 1$ we conclude that $Y_d = \emptyset$
for $d > 1$ by the above. And we conclude that $f^{-1}(Y_i) = X_i$
for $i = 0, 1$.

\medskip\noindent
It follows that $f^{-1}$ induces a bijection between the set of
open and closed subsets of $Y$ and the set of open and closed subsets of $X$.
Note that $X$ and $Y$ are spectral spaces, see Properties, Lemma
\ref{properties-lemma-quasi-compact-quasi-separated-spectral}.
By Topology, Lemma \ref{topology-lemma-connected-component-intersection}
the lattice of open and closed subsets of a spectral space
determines the set of connected components.
Hence $\pi_0(X) \to \pi_0(Y)$ is bijective. Since $\pi_0(X)$ and
$\pi_0(Y)$ are profinite spaces
(Topology, Lemma \ref{topology-lemma-pi0-profinite})
we conclude that $\pi_0(X) \to \pi_0(Y)$ is a homeomorphism by
Topology, Lemma \ref{topology-lemma-bijective-map}. This proves (1).
Part (2) is immediate.
\end{proof}

\noindent
The following lemma tells us that the fundamental group of a henselian
pair is the fundamental group of the closed subset.

\begin{lemma}
\label{lemma-gabber}
Let $(A, I)$ be a henselian pair. Set $X = \Spec(A)$ and $Z = \Spec(A/I)$.
The functor
$$
\textit{F\'Et}_X \longrightarrow \textit{F\'Et}_Z,\quad
U \longmapsto U \times_X Z
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
This is a translation of
More on Algebra, Lemma \ref{more-algebra-lemma-finite-etale-equivalence}.
\end{proof}

\noindent
The following lemma tells us that the fundamental group of a thickening
is the same as the fundamental group of the original. We will use this
in the proof of the strong proposition concerning universal homeomorphisms
below.

\begin{lemma}
\label{lemma-thickening}
Let $X \subset X'$ be a thickening of schemes. The functor
$$
\textit{F\'Et}_{X'} \longrightarrow \textit{F\'Et}_X,\quad
U' \longmapsto U' \times_{X'} X
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
For a discussion of thickenings see
More on Morphisms, Section \ref{more-morphisms-section-thickenings}.
Let $U' \to X'$ be an \'etale morphism such that $U = U' \times_{X'} X \to X$
is finite \'etale. Then $U' \to X'$ is finite \'etale as well.
This follows for example from More on Morphisms, Lemma
\ref{more-morphisms-lemma-properties-that-extend-over-thickenings}.
Now, if $X \subset X'$ is a finite order thickening then this remark
combined with \'Etale Morphisms, Theorem
\ref{etale-theorem-remarkable-equivalence}
proves the lemma. Below we will prove the lemma for general thickenings, but
we suggest the reader skip the proof.

\medskip\noindent
Let $X' = \bigcup X_i'$ be an affine open covering. Set
$X_i = X \times_{X'} X_i'$, $X_{ij}' = X'_i \cap X'_j$,
$X_{ij} = X \times_{X'} X_{ij}'$, $X_{ijk}' = X'_i \cap X'_j \cap X'_k$,
$X_{ijk} = X \times_{X'} X_{ijk}'$.
Suppose that we can prove
the theorem for each of the thickenings
$X_i \subset X'_i$, $X_{ij} \subset X_{ij}'$, and $X_{ijk} \subset X_{ijk}'$.
Then the result follows for $X \subset X'$ by relative glueing of
schemes, see
Constructions, Section \ref{constructions-section-relative-glueing}.
Observe that the schemes $X_i'$, $X_{ij}'$, $X_{ijk}'$ are
each separated as open subschemes of affine schemes. Repeating the
argument one more time we reduce to the case where the schemes
$X'_i$, $X_{ij}'$, $X_{ijk}'$ are affine.

\medskip\noindent
In the affine case we have $X' = \Spec(A')$ and $X = \Spec(A'/I')$
where $I'$ is a locally nilpotent ideal. Then $(A', I')$ is a
henselian pair (More on Algebra, Lemma
\ref{more-algebra-lemma-locally-nilpotent-henselian})
and the result follows from Lemma \ref{lemma-gabber} (which is
much easier in this case).
\end{proof}

\noindent
The ``correct'' way to prove the following proposition would be to
deduce it from the invariance of the \'etale site, see
\'Etale Cohomology, Theorem
\ref{etale-cohomology-theorem-topological-invariance}.

\begin{proposition}
\label{proposition-universal-homeomorphism}
Let $f : X \to Y$ be a universal homeomorphism of schemes. Then
$$
\textit{F\'Et}_Y \longrightarrow \textit{F\'Et}_X,\quad
V \longmapsto V \times_Y X
$$
is an equivalence. Thus if $X$ and $Y$ are connected, then
$f$ induces an isomorphism $\pi_1(X, \overline{x}) \to \pi_1(Y, \overline{y})$
of fundamental groups.
\end{proposition}

\begin{proof}
Recall that a universal homeomorphism is the same thing as an
integral, universally injective, surjective morphism, see
Morphisms, Lemma \ref{morphisms-lemma-universal-homeomorphism}.
In particular, the diagonal $\Delta : X \to X \times_Y X$ is a thickening
by Morphisms, Lemma \ref{morphisms-lemma-universally-injective}.
Thus by Lemma \ref{lemma-thickening}
we see that given a finite \'etale morphism $U \to X$
there is a unique isomorphism
$$
\varphi : U \times_Y X \to X \times_Y U
$$
of schemes finite \'etale over $X \times_Y X$ which pulls back under
$\Delta$ to $\text{id} : U \to U$ over $X$.
Since $X \to X \times_Y X \times_Y X$
is a thickening as well (it is bijective and a closed immersion)
we conclude that $(U, \varphi)$ is a descent datum relative to $X/Y$.
By \'Etale Morphisms, Proposition \ref{etale-proposition-effective}
we conclude that $U = X \times_Y V$ for some $V \to Y$
quasi-compact, separated, and \'etale.
We omit the proof that $V \to Y$ is finite (hints:
the morphism $U \to V$ is surjective and $U \to Y$ is integral).
We conclude that $\textit{F\'Et}_Y \to \textit{F\'Et}_X$
is essentially surjective.

\medskip\noindent
Arguing in the same manner as above we see that given
$V_1 \to Y$ and $V_2 \to Y$ in $\textit{F\'Et}_Y$ any
morphism $a : X \times_Y V_1 \to X \times_Y V_2$ over $X$
is compatible with the canonical descent data. Thus $a$
descends to a morphism $V_1 \to V_2$ over $Y$ by
\'Etale Morphisms, Lemma \ref{etale-lemma-fully-faithful-cases}.
\end{proof}










\section{Finite \'etale covers of proper schemes}
\label{section-finite-etale-over-proper}

\noindent
In this section we show that the fundamental group of a connected proper
scheme over a henselian local ring is the same as the fundamental
group of its special fibre. We also prove a variant of this result for
a henselian pair.

\medskip\noindent
We also show that the fundamental
group of a connected proper scheme over an algebraically closed field $k$
does not change if we replace $k$ by an algebraically closed extension.

\medskip\noindent
Instead of stating and proving the results in the connected case
we prove the results in general and we leave it to the reader to deduce
the result for fundamental groups using
Lemma \ref{lemma-what-equivalence-gives}.

\begin{lemma}
\label{lemma-finite-etale-on-proper-over-henselian}
Let $A$ be a henselian local ring. Let $X$ be a proper scheme over $A$
with closed fibre $X_0$. Then the functor
$$
\textit{F\'Et}_X \to \textit{F\'Et}_{X_0},\quad
U \longmapsto U_0 = U \times_X X_0
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
The proof given here is an example of applying algebraization and
approximation. We proceed in a number of stages.

\medskip\noindent
Essential surjectivity when $A$ is a complete local Noetherian ring.
Let $X_n = X \times_{\Spec(A)} \Spec(A/\mathfrak m^{n + 1})$.
By \'Etale Morphisms, Theorem \ref{etale-theorem-remarkable-equivalence}
the inclusions
$$
X_0 \to X_1 \to X_2 \to \ldots
$$
induce equivalence of categories between the category
of schemes \'etale over $X_0$ and the category of schemes
\'etale over $X_n$.
Moreover, if $U_n \to X_n$ corresponds to a finite \'etale
morphism $U_0 \to X_0$, then $U_n \to X_n$ is finite too, for example
by More on Morphisms, Lemma
\ref{more-morphisms-lemma-thicken-property-morphisms-cartesian}.
In this case the morphism $U_0 \to \Spec(A/\mathfrak m)$
is proper as $X_0$ is proper over $A/\mathfrak m$. Thus we may apply
Grothendieck's algebraization theorem
(in the form of
Cohomology of Schemes, Lemma
\ref{coherent-lemma-algebraize-formal-scheme-finite-over-proper})
to see that there is a finite morphism $U \to X$ whose restriction
to $X_0$ recovers $U_0$. By More on Morphisms, Lemma
\ref{more-morphisms-lemma-check-smoothness-on-infinitesimal-nbhds}
we see that $U \to X$ is \'etale at every point of $U_0$.
However, since every point of $U$ specializes to a point of $U_0$
(as $U$ is proper over $A$), we conclude that $U \to X$ is \'etale.
In this way we conclude the functor is essentially surjective.

\medskip\noindent
Fully faithfulness when $A$ is a complete local Noetherian ring.
Let $U \to X$ and $V \to X$ be finite \'etale morphisms and
let $\varphi_0 : U_0 \to V_0$ be a morphism over $X_0$. Look at
the morphism
$$
\Gamma_{\varphi_0} : U_0 \longrightarrow U_0 \times_{X_0} V_0
$$
This morphism is both finite \'etale and a closed immersion.
By essential surjectivity applied to $X = U \times_X V$ we find
a finite \'etale morphism $W \to U \times_X V$ whose special
fibre is isomorphic to $\Gamma_{\varphi_0}$. Consider the projection
$W \to U$. It is finite \'etale and an isomorphism over $U_0$ by
construction. By \'Etale Morphisms, Lemma
\ref{etale-lemma-finite-etale-one-point}
$W \to U$ is an isomorphism in an open neighbourhood of $U_0$.
Thus it is an isomorphism and the composition $\varphi : U \cong W \to V$
is the desired lift of $\varphi_0$.

\medskip\noindent
Essential surjectivity when $A$ is a henselian local Noetherian G-ring.
Let $U_0 \to X_0$ be a finite \'etale morphism.
Let $A^\wedge$ be the completion of $A$ with respect to the maximal ideal.
Let $X^\wedge$ be the base change of $X$ to $A^\wedge$.
By the result above there exists a finite \'etale morphism
$V \to X^\wedge$ whose special fibre is $U_0$.
Write $A^\wedge = \colim A_i$ with $A \to A_i$ of finite type.
By Limits, Lemma \ref{limits-lemma-descend-finite-presentation}
there exists an $i$ and a finitely presented morphism $U_i \to X_{A_i}$
whose base change to $X^\wedge$ is $V$. After increasing $i$
we may assume that $U_i \to X_{A_i}$ is finite and \'etale
(Limits, Lemmas \ref{limits-lemma-descend-finite-finite-presentation} and
\ref{limits-lemma-descend-etale}). Writing
$$
A_i = A[x_1, \ldots, x_n]/(f_1, \ldots, f_m)
$$
the ring map $A_i \to A^\wedge$ can be reinterpreted as a solution
$(a_1, \ldots, a_n)$ in $A^\wedge$ for the system of equations $f_j = 0$.
By Smoothing Ring Maps, Theorem \ref{smoothing-theorem-approximation-property}
we can approximate this solution (to order $11$ for example) by a solution
$(b_1, \ldots, b_n)$ in $A$. Translating back we find an $A$-algebra map
$A_i \to A$ which gives the same closed point as the original map
$A_i \to A^\wedge$ (as $11 > 1$). The base change $U \to X$ of $V \to X_{A_i}$
by this ring map will therefore be a finite \'etale morphism whose
special fibre is isomorphic to $U_0$.

\medskip\noindent
Fully faithfulness when $A$ is a henselian local Noetherian G-ring.
This can be deduced from essential surjectivity in exactly the same
manner as was done in the case that $A$ is complete Noetherian.

\medskip\noindent
General case. Let $(A, \mathfrak m)$ be a henselian local ring.
Set $S = \Spec(A)$ and denote $s \in S$ the closed point. By Limits, Lemma
\ref{limits-lemma-proper-limit-of-proper-finite-presentation-noetherian}
we can write $X \to \Spec(A)$ as a cofiltered limit of
proper morphisms $X_i \to S_i$ with $S_i$ of finite type over $\mathbf{Z}$.
For each $i$ let $s_i \in S_i$ be the image of $s$.
Since $S = \lim S_i$ and $A = \mathcal{O}_{S, s}$ we have
$A = \colim \mathcal{O}_{S_i, s_i}$. The ring $A_i = \mathcal{O}_{S_i, s_i}$
is a Noetherian local G-ring (More on Algebra, Proposition
\ref{more-algebra-proposition-ubiquity-G-ring}).
By More on Algebra, Lemma \ref{more-algebra-lemma-henselization-colimit}
we see that $A = \colim A_i^h$. By
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-G-ring}
the rings $A_i^h$ are G-rings. Thus we see that $A = \colim A_i^h$ and
$$
X = \lim (X_i \times_{S_i} \Spec(A_i^h))
$$
as schemes. The category of schemes finite \'etale over $X$ is the limit
of the category of schemes finite \'etale over
$X_i \times_{S_i} \Spec(A_i^h)$ (by
Limits, Lemmas
\ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-finite-finite-presentation}, and
\ref{limits-lemma-descend-etale})
The same thing is true for schemes finite \'etale over
$X_0 = \lim (X_i \times_{S_i} s_i)$.
Thus we formally deduce the result for $X / \Spec(A)$
from the result for the $(X_i \times_{S_i} \Spec(A_i^h)) / \Spec(A_i^h)$
which we dealt with above.
\end{proof}

\begin{lemma}
\label{lemma-finite-etale-on-proper-over-henselian-pair}
Let $(A, I)$ be a henselian pair. Let $X$ be a proper scheme over $A$.
Set $X_0 = X \times_{\Spec(A)} \Spec(A/I)$. Then the functor
$$
\textit{F\'Et}_X \to \textit{F\'Et}_{X_0},\quad
U \longmapsto U_0 = U \times_X X_0
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
The proof of this lemma is exactly the same as the proof of
Lemma \ref{lemma-finite-etale-on-proper-over-henselian}.

\medskip\noindent
Essential surjectivity when $A$ is Noetherian and $I$-adically complete.
Let $X_n = X \times_{\Spec(A)} \Spec(A/I^{n + 1})$.
By \'Etale Morphisms, Theorem \ref{etale-theorem-remarkable-equivalence}
the inclusions
$$
X_0 \to X_1 \to X_2 \to \ldots
$$
induce equivalence of categories between the category
of schemes \'etale over $X_0$ and the category of schemes
\'etale over $X_n$.
Moreover, if $U_n \to X_n$ corresponds to a finite \'etale
morphism $U_0 \to X_0$, then $U_n \to X_n$ is finite too, for example
by More on Morphisms, Lemma
\ref{more-morphisms-lemma-thicken-property-morphisms-cartesian}.
In this case the morphism $U_0 \to \Spec(A/I)$
is proper as $X_0$ is proper over $A/I$. Thus we may apply
Grothendieck's algebraization theorem
(in the form of
Cohomology of Schemes, Lemma
\ref{coherent-lemma-algebraize-formal-scheme-finite-over-proper})
to see that there is a finite morphism $U \to X$ whose restriction
to $X_0$ recovers $U_0$. By More on Morphisms, Lemma
\ref{more-morphisms-lemma-check-smoothness-on-infinitesimal-nbhds}
we see that $U \to X$ is \'etale at every point of $U_0$.
However, since every point of $U$ specializes to a point of $U_0$
(as $U$ is proper over $A$), we conclude that $U \to X$ is \'etale.
In this way we conclude the functor is essentially surjective.

\medskip\noindent
Fully faithfulness when $A$ is Noetherian and $I$-adically complete.
Let $U \to X$ and $V \to X$ be finite \'etale morphisms and
let $\varphi_0 : U_0 \to V_0$ be a morphism over $X_0$. Look at
the morphism
$$
\Gamma_{\varphi_0} : U_0 \longrightarrow U_0 \times_{X_0} V_0
$$
This morphism is both finite \'etale and a closed immersion.
By essential surjectivity applied to $X = U \times_X V$ we find
a finite \'etale morphism $W \to U \times_X V$ whose special
fibre is isomorphic to $\Gamma_{\varphi_0}$. Consider the projection
$W \to U$. It is finite \'etale and an isomorphism over $U_0$ by
construction. By \'Etale Morphisms, Lemma
\ref{etale-lemma-finite-etale-one-point}
$W \to U$ is an isomorphism in an open neighbourhood of $U_0$.
Thus it is an isomorphism and the composition $\varphi : U \cong W \to V$
is the desired lift of $\varphi_0$.

\medskip\noindent
Essential surjectivity when $(A, I)$ is a henselian pair
and $A$ is a Noetherian G-ring.
Let $U_0 \to X_0$ be a finite \'etale morphism.
Let $A^\wedge$ be the completion of $A$ with respect to $I$.
Observe that $A^\wedge$ is a Noetherian ring which is
$IA^\wedge$-adically complete, see Algebra, Lemmas
\ref{algebra-lemma-completion-complete} and
\ref{algebra-lemma-completion-Noetherian-Noetherian}.
Let $X^\wedge$ be the base change of $X$ to $A^\wedge$.
By the result above there exists a finite \'etale morphism
$V \to X^\wedge$ whose special fibre is $U_0$.
Write $A^\wedge = \colim A_i$ with $A \to A_i$ of finite type.
By Limits, Lemma \ref{limits-lemma-descend-finite-presentation}
there exists an $i$ and a finitely presented morphism $U_i \to X_{A_i}$
whose base change to $X^\wedge$ is $V$. After increasing $i$
we may assume that $U_i \to X_{A_i}$ is finite and \'etale
(Limits, Lemmas \ref{limits-lemma-descend-finite-finite-presentation} and
\ref{limits-lemma-descend-etale}). Writing
$$
A_i = A[x_1, \ldots, x_n]/(f_1, \ldots, f_m)
$$
the ring map $A_i \to A^\wedge$ can be reinterpreted as a solution
$(a_1, \ldots, a_n)$ in $A^\wedge$ for the system of equations $f_j = 0$.
By Smoothing Ring Maps, Lemma \ref{smoothing-lemma-henselian-pair}
we can approximate this solution (to order $11$ for example) by a solution
$(b_1, \ldots, b_n)$ in $A$. Translating back we find an $A$-algebra map
$A_i \to A$ which gives the same closed point as the original map
$A_i \to A^\wedge$ (as $11 > 1$). The base change $U \to X$ of $V \to X_{A_i}$
by this ring map will therefore be a finite \'etale morphism whose
special fibre is isomorphic to $U_0$.

\medskip\noindent
Fully faithfulness when $(A, I$ is a henselian pair and $A$ is a Noetherian
G-ring. This can be deduced from essential surjectivity in exactly the same
manner as was done in the case that $A$ is complete Noetherian.

\medskip\noindent
General case. Let $(A, I)$ be a henselian pair.
Set $S = \Spec(A)$ and denote $S_0 = \Spec(A/I)$. By Limits, Lemma
\ref{limits-lemma-proper-limit-of-proper-finite-presentation-noetherian}
we can write $X \to \Spec(A)$ as a cofiltered limit of
proper morphisms $X_i \to S_i$ with $S_i$ affine and of finite type
over $\mathbf{Z}$. Write $S_i = \Spec(A_i)$ and denote
$I_i \subset A_i$ the inverse image of $I$ by the map $A_i \to A$.
Set $S_{i, 0} = \Spec(A_i/I_i)$. Since $S = \lim S_i$ we have
$A = \colim A_i$. Thus we also have $I = \colim I_i$ and $A/I = \colim A_i/I_i$.
The ring $A_i$ is a Noetherian G-ring (More on Algebra, Proposition
\ref{more-algebra-proposition-ubiquity-G-ring}).
Denote $(A_i^h, I_i^h)$ the henselization of the pair $(A_i, I_i)$.
By More on Algebra, Lemma \ref{more-algebra-lemma-henselization-colimit}
we see that $A = \colim A_i^h$. By
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-pair-G-ring}
the rings $A_i^h$ are G-rings. Thus we see that $A = \colim A_i^h$ and
$$
X = \lim (X_i \times_{S_i} \Spec(A_i^h))
$$
as schemes. The category of schemes finite \'etale over $X$ is the limit
of the category of schemes finite \'etale over
$X_i \times_{S_i} \Spec(A_i^h)$ (by
Limits, Lemmas
\ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-finite-finite-presentation}, and
\ref{limits-lemma-descend-etale})
The same thing is true for schemes finite \'etale over
$X_0 = \lim (X_i \times_{S_i} S_{i, 0})$.
Thus we formally deduce the result for $X / \Spec(A)$
from the result for the $(X_i \times_{S_i} \Spec(A_i^h)) / \Spec(A_i^h)$
which we dealt with above.
\end{proof}

\begin{lemma}
\label{lemma-finite-etale-invariant-over-proper}
Let $k'/k$ be an extension of algebraically closed fields.
Let $X$ be a proper scheme over $k$. Then the functor
$$
U \longmapsto U_{k'}
$$
is an equivalence of categories between schemes finite \'etale over
$X$ and schemes finite \'etale over $X_{k'}$.
\end{lemma}

\begin{proof}
Let us prove the functor is essentially surjective.
Let $U' \to X_{k'}$ be a finite \'etale morphism.
Write $k' = \colim A_i$ as a filtered colimit of finite type $k$-algebras.
By Limits, Lemma \ref{limits-lemma-descend-finite-presentation}
there exists an $i$ and a finitely presented morphism $U_i \to X_{A_i}$
whose base change to $X_{k'}$ is $U'$. After increasing $i$
we may assume that $U_i \to X_{A_i}$ is finite and \'etale
(Limits, Lemmas \ref{limits-lemma-descend-finite-finite-presentation} and
\ref{limits-lemma-descend-etale}).
Since $k$ is algebraically closed we can find a
$k$-valued point $t$ in $\Spec(A_i)$. Let $U = (U_i)_t$ be the
fibre of $U_i$ over $t$. Let $A_i^h$ be the
henselization of $(A_i)_{\mathfrak m}$ where $\mathfrak m$ is
the maximal ideal corresponding to the point $t$. By
Lemma \ref{lemma-finite-etale-on-proper-over-henselian}
we see that $(U_i)_{A_i^h} = U \times \Spec(A_i^h)$ as schemes
over $X_{A_i^h}$. Now since
$A_i^h$ is algebraic over $A_i$ (see for example discussion in
Smoothing Ring Maps, Example \ref{smoothing-example-describe-henselian})
and since $k'$ is algebraically closed
we can find a ring map $A_i^h \to k'$ extending the given
inclusion $A_i \subset k'$. Hence we conclude that $U'$
is isomorphic to the base change of $U$.
The proof of fully faithfulness is exactly the same.
\end{proof}








\section{Local connectedness}
\label{section-unibranch}

\noindent
In this section we ask when $\pi_1(U) \to \pi_1(X)$ is surjective
for $U$ a dense open of a scheme $X$. We will see that this is the
case (roughly) when $U \cap B$ is connected for any small
``ball'' $B$ around a point $x \in X \setminus U$.

\begin{lemma}
\label{lemma-dense-faithful}
Let $f : X \to Y$ be a morphism of schemes. If $f(X)$ is dense in $Y$
then the base change functor $\textit{F\'Et}_Y \to \textit{F\'Et}_X$
is faithful.
\end{lemma}

\begin{proof}
Since the category of finite \'etale coverings has an
internal hom (Lemma \ref{lemma-internal-hom-finite-etale})
it suffices to prove the following: Given $W$ finite \'etale over $Y$
and a morphism $s : X \to W$ over $X$ there is at most one section
$t : Y \to W$ such that $s = t \circ f$. Consider two sections
$t_1, t_2 : Y \to W$ such that $s = t_1 \circ f = t_2 \circ f$.
Since the equalizer of $t_1$ and $t_2$ is closed in $Y$
(Schemes, Lemma \ref{schemes-lemma-where-are-they-equal})
and since $f(X)$ is dense in $Y$ we see that $t_1$ and $t_2$
agree on $Y_{red}$. Then it follows that $t_1$ and $t_2$ have
the same image which is an open and closed subscheme of $W$ mapping
isomorphically to $Y$
(\'Etale Morphisms, Proposition \ref{etale-proposition-properties-sections})
hence they are equal.
\end{proof}

\noindent
The condition in the following lemma that the punctured spectrum
of the strict henselization is connected follows for example from
the assumption that the local ring is geometrically unibranch, see
More on Algebra, Lemma \ref{more-algebra-lemma-geometrically-unibranch}.
There is a partial converse in
Properties, Lemma \ref{properties-lemma-geometrically-unibranch}.

\begin{lemma}
\label{lemma-same-etale-extensions}
Let $(A, \mathfrak m)$ be a local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$. If the punctured spectrum
of the strict henselization of $A$ is connected, then
$$
\textit{F\'Et}_X \longrightarrow \textit{F\'Et}_U,\quad
Y \longmapsto Y \times_X U
$$
is a fully faithful functor.
\end{lemma}

\begin{proof}
Assume $A$ is strictly henselian. In this case any finite \'etale
cover $Y$ of $X$ is isomorphic to a finite disjoint union of
copies of $X$. Thus it suffices to prove that any morphism
$U \to U \amalg \ldots \amalg U$ over $U$, extends uniquely to a morphism
$X \to X \amalg \ldots \amalg X$ over $X$.
If $U$ is connected (in particular nonempty), then this is true.

\medskip\noindent
The general case. Since the category of finite \'etale coverings has an
internal hom (Lemma \ref{lemma-internal-hom-finite-etale})
it suffices to prove the following: Given $Y$ finite \'etale over $X$
any morphism $s : U \to Y$ over $X$ extends to a morphism $t : X \to Y$
over $X$. Let $A^{sh}$ be the strict henselization of $A$ and denote
$X^{sh} = \Spec(A^{sh})$, $U^{sh} = U \times_X X^{sh}$,
$Y^{sh} = Y \times_X X^{sh}$. By the first paragraph and our assumption
on $A$, we can extend the base change $s^{sh} : U^{sh} \to Y^{sh}$ of $s$ to
$t^{sh} : X^{sh} \to Y^{sh}$. Set $A' = A^{sh} \otimes_A A^{sh}$.
Then the two pullbacks $t'_1, t'_2$ of $t^{sh}$ to $X' = \Spec(A')$
are extensions of the pullback $s'$ of $s$ to $U' = U \times_X X'$.
As $A \to A'$ is flat we see that $U' \subset X'$ is (topologically) dense
by going down for $A \to A'$
(Algebra, Lemma \ref{algebra-lemma-flat-going-down}). Thus
$t'_1 = t'_2$ by Lemma \ref{lemma-dense-faithful}.
Hence $t^{sh}$ descends to a morphism $t : X \to Y$
for example by
Descent, Lemma \ref{descent-lemma-fpqc-universal-effective-epimorphisms}.
\end{proof}

\noindent
In view of Lemma \ref{lemma-same-etale-extensions}
it is interesting to know when the
punctured spectrum of a ring (and of its strict henselization)
is connected. There is a famous lemma due to Hartshorne
which gives a sufficient condition, see
Local Cohomology, Lemma
\ref{local-cohomology-lemma-depth-2-connected-punctured-spectrum}.

\begin{lemma}
\label{lemma-quasi-compact-dense-open-connected-at-infinity-Noetherian}
Let $X$ be a scheme. Let $U \subset X$ be a dense open. Assume
\begin{enumerate}
\item the underlying topological space of $X$ is Noetherian, and
\item for every $x \in X \setminus U$ the punctured spectrum of the
strict henselization of $\mathcal{O}_{X, x}$ is connected.
\end{enumerate}
Then $\textit{F\'Et}_X \to \textit{F\'et}_U$ is fully faithful.
\end{lemma}

\begin{proof}
Let $Y_1, Y_2$ be finite \'etale over $X$ and let
$\varphi : (Y_1)_U \to (Y_2)_U$ be a morphism over $U$. We have to show that
$\varphi$ lifts uniquely to a morphism $Y_1 \to Y_2$ over $X$.
Uniqueness follows from Lemma \ref{lemma-dense-faithful}.

\medskip\noindent
Let $x \in X \setminus U$ be a generic point of an irreducible component
of $X \setminus U$. Set $V = U \times_X \Spec(\mathcal{O}_{X, x})$.
By our choice of $x$ this is the punctured spectrum of
$\Spec(\mathcal{O}_{X, x})$. By
Lemma \ref{lemma-same-etale-extensions}
we can extend the morphism $\varphi_V : (Y_1)_V \to (Y_2)_V$
uniquely to a morphism
$(Y_1)_{\Spec(\mathcal{O}_{X, x})} \to (Y_2)_{\Spec(\mathcal{O}_{X, x})}$.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
we find an open $U \subset U'$ containing $x$ and an extension
$\varphi' : (Y_1)_{U'} \to (Y_2)_{U'}$ of $\varphi$.
Since the underlying topological space of $X$ is Noetherian
this finishes the proof by Noetherian induction on the complement
of the open over which $\varphi$ is defined.
\end{proof}

\begin{lemma}
\label{lemma-retrocompact-dense-open-connected-at-infinity-closed}
Let $X$ be a scheme. Let $U \subset X$ be a dense open. Assume
\begin{enumerate}
\item $U \to X$ is quasi-compact,
\item every point of $X \setminus U$ is closed, and
\item for every $x \in X \setminus U$ the punctured spectrum of the
strict henselization of $\mathcal{O}_{X, x}$ is connected.
\end{enumerate}
Then $\textit{F\'Et}_X \to \textit{F\'et}_U$ is fully faithful.
\end{lemma}

\begin{proof}
Let $Y_1, Y_2$ be finite \'etale over $X$ and let
$\varphi : (Y_1)_U \to (Y_2)_U$ be a morphism over $U$. We have to show that
$\varphi$ lifts uniquely to a morphism $Y_1 \to Y_2$ over $X$.
Uniqueness follows from Lemma \ref{lemma-dense-faithful}.

\medskip\noindent
Let $x \in X \setminus U$. Set $V = U \times_X \Spec(\mathcal{O}_{X, x})$.
Since every point of $X \setminus U$ is closed $V$ is the punctured spectrum
of $\Spec(\mathcal{O}_{X, x})$. By
Lemma \ref{lemma-same-etale-extensions}
we can extend the morphism $\varphi_V : (Y_1)_V \to (Y_2)_V$
uniquely to a morphism
$(Y_1)_{\Spec(\mathcal{O}_{X, x})} \to (Y_2)_{\Spec(\mathcal{O}_{X, x})}$.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
(this uses that $U$ is retrocompact in $X$)
we find an open $U \subset U'_x$ containing $x$ and an extension
$\varphi'_x : (Y_1)_{U'_x} \to (Y_2)_{U'_x}$ of $\varphi$.
Note that given two points $x, x' \in X \setminus U$ the
morphisms $\varphi'_x$ and $\varphi'_{x'}$ agree over
$U'_x \cap U'_{x'}$ as $U$ is dense in that open
(Lemma \ref{lemma-dense-faithful}). Thus we can extend $\varphi$
to $\bigcup U'_x = X$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-quasi-compact-dense-open-connected-at-infinity}
Let $X$ be a scheme. Let $U \subset X$ be a dense open. Assume
\begin{enumerate}
\item every quasi-compact open of $X$ has finitely many
irreducible components,
\item for every $x \in X \setminus U$ the punctured spectrum of the
strict henselization of $\mathcal{O}_{X, x}$ is connected.
\end{enumerate}
Then $\textit{F\'Et}_X \to \textit{F\'et}_U$ is fully faithful.
\end{lemma}

\begin{proof}
Let $Y_1, Y_2$ be finite \'etale over $X$ and let
$\varphi : (Y_1)_U \to (Y_2)_U$ be a morphism over $U$. We have to show that
$\varphi$ lifts uniquely to a morphism $Y_1 \to Y_2$ over $X$.
Uniqueness follows from Lemma \ref{lemma-dense-faithful}.
We will prove existence by showing that we can enlarge $U$
if $U \not = X$ and using Zorn's lemma to finish the proof.

\medskip\noindent
Let $x \in X \setminus U$ be a generic point of an irreducible component
of $X \setminus U$. Set $V = U \times_X \Spec(\mathcal{O}_{X, x})$.
By our choice of $x$ this is the punctured spectrum of
$\Spec(\mathcal{O}_{X, x})$. By
Lemma \ref{lemma-same-etale-extensions}
we can extend the morphism $\varphi_V : (Y_1)_V \to (Y_2)_V$
(uniquely) to a morphism
$(Y_1)_{\Spec(\mathcal{O}_{X, x})} \to (Y_2)_{\Spec(\mathcal{O}_{X, x})}$.
Choose an affine neighbourhood $W \subset X$ of $x$.
Since $U \cap W$ is dense in $W$ it contains the generic points
$\eta_1, \ldots, \eta_n$ of $W$. Choose an affine open
$W' \subset W \cap U$ containing $\eta_1, \ldots, \eta_n$.
Set $V' = W' \times_X \Spec(\mathcal{O}_{X, x})$.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
applied to $x \in W \supset W'$
we find an open $W' \subset W'' \subset W$ with $x \in W''$
and a morphism $\varphi'' : (Y_1)_{W''} \to (Y_2)_{W''}$
agreeing with $\varphi$ over $W'$. Since $W'$ is dense in
$W'' \cap U$, we see by Lemma \ref{lemma-dense-faithful}
that $\varphi$ and $\varphi''$ agree over $U \cap W'$.
Thus $\varphi$ and $\varphi''$ glue to a morphism
$\varphi'$ over $U' = U \cup W''$ agreeing with $\varphi$ over $U$.
Observe that $x \in U'$ so that we've extended $\varphi$
to a strictly larger open.

\medskip\noindent
Consider the set $\mathcal{S}$ of pairs $(U', \varphi')$ where $U \subset U'$
and $\varphi'$ is an extension of $\varphi$. We endow $\mathcal{S}$
with a partial ordering in the obvious manner. If $(U'_i, \varphi'_i)$
is a totally ordered subset, then it has a maximum $(U', \varphi')$.
Just take $U' = \bigcup U'_i$ and let
$\varphi' : (Y_1)_{U'} \to (Y_2)_{U'}$ be the morphism
agreeing with $\varphi'_i$ over $U'_i$. Thus Zorn's lemma applies
and $\mathcal{S}$ has a maximal element. By the argument above
we see that this maximal element is an extension of $\varphi$
over all of $X$.
\end{proof}

\begin{lemma}
\label{lemma-local-exact-sequence}
Let $(A, \mathfrak m)$ be a local ring. Set $X = \Spec(A)$ and
$U = X \setminus \{\mathfrak m\}$. Let $U^{sh}$ be the punctured spectrum
of the strict henselization $A^{sh}$ of $A$.
Assume $U$ is quasi-compact and $U^{sh}$ is connected. Then the sequence
$$
\pi_1(U^{sh}, \overline{u}) \to \pi_1(U, \overline{u}) \to
\pi_1(X, \overline{u}) \to 1
$$
is exact in the sense of Lemma \ref{lemma-functoriality-galois-ses} part (1).
\end{lemma}

\begin{proof}
The map $\pi_1(U) \to \pi_1(X)$ is surjective by
Lemmas \ref{lemma-same-etale-extensions} and
\ref{lemma-functoriality-galois-surjective}.

\medskip\noindent
Write $X^{sh} = \Spec(A^{sh})$. Let $Y \to X$ be a finite \'etale morphism.
Then $Y^{sh} = Y \times_X X^{sh} \to X^{sh}$ is a finite \'etale morphism.
Since $A^{sh}$ is strictly henselian we see that $Y^{sh}$ is isomorphic
to a disjoint union of copies of $X^{sh}$. Thus the same is true for
$Y \times_X U^{sh}$. It follows that the composition
$\pi_1(U^{sh}) \to \pi_1(U) \to \pi_1(X)$ is trivial, see
Lemma \ref{lemma-composition-trivial}.

\medskip\noindent
To finish the proof, it suffices according to
Lemma \ref{lemma-functoriality-galois-ses}
to show the following: Given a finite \'etale morphism
$V \to U$ such that $V \times_U U^{sh}$ is a disjoint
union of copies of $U^{sh}$, we can find a finite \'etale
morphism $Y \to X$ with $V \cong Y \times_X U$ over $U$.
The assumption implies that there exists a finite \'etale
morphism $Y^{sh} \to X^{sh}$ and an isomorphism
$V \times_U U^{sh} \cong Y^{sh} \times_{X^{sh}} U^{sh}$.
Consider the following diagram
$$
\xymatrix{
U \ar[d] & U^{sh} \ar[d] \ar[l] &
U^{sh} \times_U U^{sh} \ar[d] \ar@<1ex>[l] \ar@<-1ex>[l] &
U^{sh} \times_U U^{sh} \times_U U^{sh}
\ar[d] \ar@<1ex>[l] \ar[l] \ar@<-1ex>[l] \\
X & X^{sh} \ar[l] &
X^{sh} \times_X X^{sh} \ar@<1ex>[l] \ar@<-1ex>[l] &
X^{sh} \times_X X^{sh} \times_X X^{sh} \ar@<1ex>[l] \ar[l] \ar@<-1ex>[l]
}
$$
Since $U \subset X$ is quasi-compact by assumption, all the
downward arrows are quasi-compact open immersions.
Let $\xi \in X^{sh} \times_X X^{sh}$ be a point not
in $U^{sh} \times_U U^{sh}$. Then $\xi$ lies over the closed
point $x^{sh}$ of $X^{sh}$.
Consider the local ring homomorphism
$$
A^{sh} = \mathcal{O}_{X^{sh}, x^{sh}} \to
\mathcal{O}_{X^{sh} \times_X X^{sh}, \xi}
$$
determined by the first projection $X^{sh} \times_X X^{sh}$.
This is a filtered colimit of local homomorphisms which are
localizations \'etale ring maps.
Since $A^{sh}$ is strictly henselian, we conclude that it is an
isomorphism. Since this holds for every $\xi$ in the complement
it follows there are no specializations among these points and
hence every such $\xi$ is a closed point (you can also prove
this directly). As the local ring at $\xi$ is isomorphic
to $A^{sh}$, it is strictly henselian and has connected punctured spectrum.
Similarly for points $\xi$ of $X^{sh} \times_X X^{sh} \times_X X^{sh}$ not
in $U^{sh} \times_U U^{sh} \times_U U^{sh}$. It follows from
Lemma \ref{lemma-retrocompact-dense-open-connected-at-infinity-closed}
that pullback along the vertical arrows induce fully faithful functors on
the categories of finite \'etale schemes. Thus the
canonical descent datum on $V \times_U U^{sh}$ relative to
the fpqc covering $\{U^{sh} \to U\}$ translates into a
descent datum for $Y^{sh}$ relative to the fpqc covering $\{X^{sh} \to X\}$.
Since $Y^{sh} \to X^{sh}$ is finite hence affine, this descent datum is
effective (Descent, Lemma \ref{descent-lemma-affine}).
Thus we get an affine morphism $Y \to X$ and an isomorphism
$Y \times_X X^{sh} \to Y^{sh}$ compatible with descent data.
By fully faithfulness of descent data
(as in Descent, Lemma \ref{descent-lemma-refine-coverings-fully-faithful})
we get an isomorphism $V \to U \times_X Y$.
Finally, $Y \to X$ is finite \'etale as $Y^{sh} \to X^{sh}$ is, see
Descent, Lemmas \ref{descent-lemma-descending-property-etale} and
\ref{descent-lemma-descending-property-finite}.
\end{proof}

\noindent
Let $X$ be an irreducible scheme. Let $\eta \in X$ be the generic
point. The canonical morphism $\eta \to X$ induces a canonical map
\begin{equation}
\label{equation-inclusion-generic-point}
\text{Gal}(\kappa(\eta)^{sep}/\kappa(\eta)) = \pi_1(\eta, \overline{\eta})
\longrightarrow \pi_1(X, \overline{\eta})
\end{equation}
The identification on the left hand side is
Lemma \ref{lemma-fundamental-group-Galois-group}.

\begin{lemma}
\label{lemma-irreducible-geometrically-unibranch}
Let $X$ be an irreducible, geometrically unibranch scheme.
For any nonempty open $U \subset X$ the canonical map
$$
\pi_1(U, \overline{u}) \longrightarrow \pi_1(X, \overline{u})
$$
is surjective. The map (\ref{equation-inclusion-generic-point})
$\pi_1(\eta, \overline{\eta}) \to \pi_1(X, \overline{\eta})$
is surjective as well.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-thickening} we may replace $X$ by its reduction.
Thus we may assume that $X$ is an integral scheme. By
Lemma \ref{lemma-functoriality-galois-surjective}
the assertion of the lemma translates into the statement that
the functors $\textit{F\'Et}_X \to \textit{F\'Et}_U$ and
$\textit{F\'Et}_X \to \textit{F\'Et}_\eta$ are fully faithful.

\medskip\noindent
The result for $\textit{F\'Et}_X \to \textit{F\'Et}_U$ follows
from Lemma \ref{lemma-quasi-compact-dense-open-connected-at-infinity}
and the fact that for a local ring $A$ which is
geometrically unibranch its strict henselization has an
irreducible spectrum. See
More on Algebra, Lemma \ref{more-algebra-lemma-geometrically-unibranch}.

\medskip\noindent
Observe that the residue field $\kappa(\eta) = \mathcal{O}_{X, \eta}$
is the filtered colimit of $\mathcal{O}_X(U)$ over $U \subset X$
nonempty open affine. Hence $\textit{F\'Et}_\eta$ is the colimit of the
categories $\textit{F\'Et}_U$ over such $U$, see
Limits, Lemmas \ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-finite-finite-presentation}, and
\ref{limits-lemma-descend-etale}.
A formal argument then shows that fully faithfulness for
$\textit{F\'Et}_X \to \textit{F\'Et}_\eta$ follows from the
fully faithfulness of the functors $\textit{F\'Et}_X \to \textit{F\'Et}_U$.
\end{proof}

\begin{lemma}
\label{lemma-exact-sequence-finite-nr-closed-pts}
Let $X$ be a scheme. Let $x_1, \ldots, x_n \in X$ be a finite
number of closed points such that
\begin{enumerate}
\item $U = X \setminus \{x_1, \ldots, x_n\}$ is connected and is
a retrocompact open of $X$, and
\item for each $i$ the punctured spectrum $U_i^{sh}$ of the
strict henselization of $\mathcal{O}_{X, x_i}$ is connected.
\end{enumerate}
Then the map $\pi_1(U) \to \pi_1(X)$ is surjective and the kernel
is the smallest closed normal subgroup of $\pi_1(U)$ containing
the image of $\pi_1(U_i^{sh}) \to \pi_1(U)$ for $i = 1, \ldots, n$.
\end{lemma}

\begin{proof}
Surjectivity follows from
Lemmas \ref{lemma-retrocompact-dense-open-connected-at-infinity-closed} and
\ref{lemma-functoriality-galois-surjective}.
We can consider the sequence of maps
$$
\pi_1(U)  \to \ldots \to
\pi_1(X \setminus \{x_1, x_2\}) \to \pi_1(X \setminus \{x_1\}) \to \pi_1(X)
$$
A group theory argument then shows it suffices to prove the statement on the
kernel in the case $n = 1$ (details omitted). Write
$x = x_1$, $U^{sh} = U_1^{sh}$,
set $A = \mathcal{O}_{X, x}$, and let $A^{sh}$ be the strict henselization.
Consider the diagram
$$
\xymatrix{
U \ar[d] &
\Spec(A) \setminus \{\mathfrak m\} \ar[l] \ar[d] &
U^{sh} \ar[d] \ar[l] \\
X & \Spec(A) \ar[l] & \Spec(A^{sh}) \ar[l]
}
$$
By Lemma \ref{lemma-functoriality-galois-ses}
we have to show finite \'etale morphisms
$V \to U$ which pull back to trivial coverings of $U^{sh}$
extend to finite \'etale schemes over $X$.
By Lemma \ref{lemma-local-exact-sequence}
we know the corresponding statement
for finite \'etale schemes over the punctured spectrum of $A$.
However, by Limits, Lemma \ref{limits-lemma-glueing-near-closed-point}
schemes of finite presentation over $X$ are the same thing as
schemes of finite presentation over $U$ and $A$ glued over
the punctured spectrum of $A$. This finishes the proof.
\end{proof}









\section{Fundamental groups of normal schemes}
\label{section-normal}

\noindent
Let $X$ be an integral, geometrically unibranch scheme. In the previous section
we have seen that the fundamental group of $X$ is a quotient of the
Galois group of the function field $K$ of $X$. Since the map is continuous
the kernel is a normal closed subgroup of the Galois group. Hence this kernel
corresponds to a Galois extension $M/K$ by Galois theory
(Fields, Theorem \ref{fields-theorem-inifinite-galois-theory}).
In this section we will determine $M$ when $X$ is a normal integral scheme.

\medskip\noindent
Let $X$ be an integral normal scheme with function field $K$.
Let $L/K$ be a finite extension. Consider the normalization
$Y \to X$ of $X$ in the morphism $\Spec(L) \to X$ as defined in
Morphisms, Section \ref{morphisms-section-normalization-X-in-Y}.
We will say (in this setting) that {\it $X$ is unramified in $L$}
if $Y \to X$ is an unramified morphism of schemes. In
Lemma \ref{lemma-unramified} we will elucidate this condition.
Observe that the scheme theoretic fibre of $Y \to X$ over $\Spec(K)$
is $\Spec(L)$. Hence the field extension $L/K$ is separable if $X$ is
unramified in $L$, see
Morphisms, Lemmas \ref{morphisms-lemma-unramified-over-field}.

\begin{lemma}
\label{lemma-unramified-in-L}
In the situation above the following are equivalent
\begin{enumerate}
\item $X$ is unramified in $L$,
\item $Y \to X$ is \'etale, and
\item $Y \to X$ is finite \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that $Y \to X$ is an integral morphism.
In each case the morphism $Y \to X$ is locally of finite type
by definition.
Hence we find that in each case $Y \to X$ is finite by
Morphisms, Lemma \ref{morphisms-lemma-finite-integral}.
In particular we see that (2) is equivalent to (3).
An \'etale morphism is unramified, hence (2) implies (1).

\medskip\noindent
Conversely, assume $Y \to X$ is unramified. Since a normal scheme is
geometrically unibranch
(Properties, Lemma \ref{properties-lemma-normal-geometrically-unibranch}),
we see that the morphism $Y \to X$ is \'etale by More on Morphisms, Lemma
\ref{more-morphisms-lemma-global-unramified-dominant-unibranch-is-etale}.
We also give a direct proof in the next paragraph.

\medskip\noindent
Let $x \in X$.
We can choose an \'etale neighbourhood $(U, u) \to (X, x)$ such that
$$
Y \times_X U = \coprod V_j \longrightarrow U
$$
is a disjoint union of closed immersions, see
\'Etale Morphisms, Lemma \ref{etale-lemma-finite-unramified-etale-local}.
Shrinking we may assume $U$ is quasi-compact.
Then $U$ has finitely many irreducible components
(Descent, Lemma \ref{descent-lemma-locally-finite-nr-irred-local-fppf}).
Since $U$ is normal
(Descent, Lemma \ref{descent-lemma-normal-local-smooth}) the
irreducible components of $U$ are open and closed
(Properties, Lemma \ref{properties-lemma-normal-locally-finite-nr-irreducibles})
and we may assume $U$ is irreducible. Then $U$ is an integral
scheme whose generic point $\xi$ maps to the generic point of $X$.
On the other hand, we know that $Y \times_X U$
is the normalization of $U$ in $\Spec(L) \times_X U$
by More on Morphisms, Lemma
\ref{more-morphisms-lemma-normalization-smooth-localization}.
Every point of $\Spec(L) \times_X U$ maps to $\xi$.
Thus every $V_j$ contains a point mapping to $\xi$ by
Morphisms, Lemma \ref{morphisms-lemma-normalization-generic}.
Thus $V_j \to U$ is an isomorphism as $U = \overline{\{\xi\}}$.
Thus $Y \times_X U \to U$ is \'etale. By
Descent, Lemma \ref{descent-lemma-descending-property-etale}
we conclude that $Y \to X$ is \'etale over the
image of $U \to X$ (an open neighbourhood of $x$).
\end{proof}

\begin{lemma}
\label{lemma-finite-etale-covering-normal-unramified}
Let $X$ be a normal integral scheme with function field $K$.
Let $Y \to X$ be a finite \'etale morphism. If $Y$ is connected,
then $Y$ is an integral normal scheme and $Y$ is the normalization
of $X$ in the function field of $Y$.
\end{lemma}

\begin{proof}
The scheme $Y$ is normal by
Descent, Lemma \ref{descent-lemma-normal-local-smooth}.
Since $Y \to X$ is flat every generic point of $Y$ maps
to the generic point of $X$ by
Morphisms, Lemma \ref{morphisms-lemma-generalizations-lift-flat}.
Since $Y \to X$ is finite we see that $Y$ has a finite number
of irreducible components. Thus $Y$ is the disjoint union of
a finite number of integral normal schemes by
Properties, Lemma \ref{properties-lemma-normal-locally-finite-nr-irreducibles}.
Thus if $Y$ is connected, then $Y$ is an integral normal scheme.

\medskip\noindent
Let $L$ be the function field of $Y$ and let $Y' \to X$ be the normalization
of $X$ in $L$. By
Morphisms, Lemma \ref{morphisms-lemma-characterize-normalization}
we obtain a factorization $Y' \to Y \to X$ and $Y' \to Y$ is
the normalization of $Y$ in $L$. Since $Y$ is normal it is clear
that $Y' = Y$ (this can also be deduced from
Morphisms, Lemma \ref{morphisms-lemma-finite-birational-over-normal}).
\end{proof}

\begin{proposition}
\label{proposition-normal}
Let $X$ be a normal integral scheme with function field $K$.
Then the canonical map (\ref{equation-inclusion-generic-point})
$$
\text{Gal}(K^{sep}/K) = \pi_1(\eta, \overline{\eta})
\longrightarrow \pi_1(X, \overline{\eta})
$$
is identified with the quotient map
$\text{Gal}(K^{sep}/K) \to \text{Gal}(M/K)$ where $M \subset K^{sep}$
is the union of the finite subextensions $L$
such that $X$ is unramified in $L$.
\end{proposition}

\begin{proof}
The normal scheme $X$ is geometrically unibranch
(Properties, Lemma \ref{properties-lemma-normal-geometrically-unibranch}).
Hence Lemma \ref{lemma-irreducible-geometrically-unibranch} applies to $X$.
Thus $\pi_1(\eta, \overline{\eta}) \to \pi_1(X, \overline{\eta})$
is surjective and top horizontal arrow of the commutative diagram
$$
\xymatrix{
\textit{F\'Et}_X \ar[r] \ar[d] \ar[rd]_c & \textit{F\'Et}_\eta \ar[d] \\
\textit{Finite-}\pi_1(X, \overline{\eta})\textit{-sets} \ar[r] &
\textit{Finite-}\text{Gal}(K^{sep}/K)\textit{-sets}
}
$$
is fully faithful. The left vertical arrow is the equivalence of
Theorem \ref{theorem-fundamental-group}
and the right vertical arrow is the equivalence of
Lemma \ref{lemma-fundamental-group-Galois-group}. The lower
horizontal arrow is induced by the map of the proposition.
By Lemmas \ref{lemma-unramified-in-L} and
\ref{lemma-finite-etale-covering-normal-unramified}
we see that the essential image of $c$
consists of $\text{Gal}(K^{sep}/K)\textit{-Sets}$ isomorphic
to sets of the form
$$
S = \Hom_K(\prod\nolimits_{i = 1, \ldots, n} L_i, K^{sep}) =
\coprod\nolimits_{i = 1, \ldots, n} \Hom_K(L_i, K^{sep})
$$
with $L_i/K$ finite separable such that $X$ is unramified in $L_i$.
Thus if $M \subset K^{sep}$ is as in the statement of the lemma,
then $\text{Gal}(K^{sep}/M)$ is exactly the subgroup of
$\text{Gal}(K^{sep}/K)$ acting trivially on every object
in the essential image of $c$. On the other hand, the essential image of $c$
is exactly the category of $S$ such that the $\text{Gal}(K^{sep}/K)$-action
factors through the surjection
$\text{Gal}(K^{sep}/K) \to \pi_1(X, \overline{\eta})$.
We conclude that $\text{Gal}(K^{sep}/M)$ is the kernel.
Hence $\text{Gal}(K^{sep}/M)$ is a normal subgroup, $M/K$ is Galois,
and we have a short exact sequence
$$
1 \to \text{Gal}(K^{sep}/M) \to
\text{Gal}(K^{sep}/K) \to
\text{Gal}(M/K) \to 1
$$
by Galois theory (Fields, Theorem
\ref{fields-theorem-inifinite-galois-theory} and
Lemma \ref{fields-lemma-ses-infinite-galois}). The proof is done.
\end{proof}

\begin{lemma}
\label{lemma-local-exact-sequence-normal}
Let $(A, \mathfrak m)$ be a normal local ring.
Set $X = \Spec(A)$. Let $A^{sh}$ be the strict henselization of $A$.
Let $K$ and $K^{sh}$ be the fraction fields of $A$ and $A^{sh}$.
Then the sequence
$$
\pi_1(\Spec(K^{sh})) \to \pi_1(\Spec(K)) \to \pi_1(X) \to 1
$$
is exact in the sense of Lemma \ref{lemma-functoriality-galois-ses} part (1).
\end{lemma}

\begin{proof}
Note that $A^{sh}$ is a normal domain, see
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-normal}.
The map $\pi_1(\Spec(K)) \to \pi_1(X)$ is surjective by
Proposition \ref{proposition-normal}.

\medskip\noindent
Write $X^{sh} = \Spec(A^{sh})$. Let $Y \to X$ be a finite \'etale morphism.
Then $Y^{sh} = Y \times_X X^{sh} \to X^{sh}$ is a finite \'etale morphism.
Since $A^{sh}$ is strictly henselian we see that $Y^{sh}$ is isomorphic
to a disjoint union of copies of $X^{sh}$. Thus the same is true for
$Y \times_X \Spec(K^{sh})$. It follows that the composition
$\pi_1(\Spec(K^{sh})) \to \pi_1(X)$ is trivial, see
Lemma \ref{lemma-composition-trivial}.

\medskip\noindent
To finish the proof, it suffices according to
Lemma \ref{lemma-functoriality-galois-ses}
to show the following: Given a finite \'etale morphism
$V \to \Spec(K)$ such that $V \times_{\Spec(K)} \Spec(K^{sh})$
is a disjoint union of copies of $\Spec(K^{sh})$, we can find a
finite \'etale morphism
$Y \to X$ with $V \cong Y \times_X \Spec(K)$ over $\Spec(K)$.
Write $V = \Spec(L)$, so $L$ is a finite product of
finite separable extensions of $K$.
Let $B \subset L$ be the integral closure of $A$ in $L$.
If $A \to B$ is \'etale, then we can take $Y = \Spec(B)$
and the proof is complete. By
Algebra, Lemma \ref{algebra-lemma-integral-closure-commutes-smooth}
(and a limit argument we omit)
we see that $B \otimes_A A^{sh}$ is the integral closure of
$A^{sh}$ in $L^{sh} = L \otimes_K K^{sh}$.
Our assumption is that $L^{sh}$ is a product of copies of
$K^{sh}$ and hence $B^{sh}$ is a product of copies of $A^{sh}$.
Thus $A^{sh} \to B^{sh}$ is \'etale. As $A \to A^{sh}$ is
faithfully flat it follows that $A \to B$ is \'etale
(Descent, Lemma \ref{descent-lemma-descending-property-etale})
as desired.
\end{proof}







\section{Group actions and integral closure}
\label{section-group-actions-integral}

\noindent
In this section we continue the discussion of
More on Algebra, Section \ref{more-algebra-section-group-actions-integral}.
Recall that a normal local ring is a domain by definition.

\begin{lemma}
\label{lemma-get-algebraic-closure}
Let $A$ be a normal domain whose fraction field $K$ is separably algebraically
closed. Let $\mathfrak p \subset A$ be a nonzero prime ideal.
Then the residue field $\kappa(\mathfrak p)$ is algebraically closed.
\end{lemma}

\begin{proof}
Assume the lemma is not true to get a contradiction. Then there exists a
monic irreducible polynomial $P(T) \in \kappa(\mathfrak p)[T]$ of
degree $d > 1$. After replacing $P$ by $a^d P(a^{-1}T)$ for suitable $a \in A$
(to clear denominators) we may assume that $P$ is the image of a
monic polynomial $Q$ in $A[T]$. Observe that $Q$ is irreducible in
$K[T]$. Namely a factorization over $K$ leads to a factorization
over $A$ by Algebra, Lemma \ref{algebra-lemma-polynomials-divide}
which we could reduce modulo $\mathfrak p$ to get a factorization of $P$.
As $K$ is separably closed, $Q$ is not a separable polynomial
(Fields, Definition \ref{fields-definition-separable}).
Then the characteristic of $K$ is $p > 0$ and $Q$ has
vanishing linear term (Fields, Definition \ref{fields-definition-separable}).
However, then we can replace $Q$ by
$Q + a T$ where $a \in \mathfrak p$ is nonzero to get a contradiction.
\end{proof}

\begin{lemma}
\label{lemma-normal-local-domain-separablly-closed-fraction-field}
A normal local ring with separably closed fraction field is
strictly henselian.
\end{lemma}

\begin{proof}
Let $(A, \mathfrak m, \kappa)$ be normal local with separably
closed fraction field $K$. If $A = K$, then we are done. If not,
then the residue field $\kappa$ is algebraically closed
by Lemma \ref{lemma-get-algebraic-closure} and it suffices to
check that $A$ is henselian.
Let $f \in A[T]$ be monic and let $a_0 \in \kappa$ be a root
of multiplicity $1$ of the reduction $\overline{f} \in \kappa[T]$.
Let $f = \prod f_i$ be the factorization in $K[T]$.
By Algebra, Lemma \ref{algebra-lemma-polynomials-divide} we have
$f_i \in A[T]$. Thus $a_0$ is a root of $f_i$ for some $i$.
After replacing $f$ by $f_i$ we may assume $f$ is irreducible.
Then, since the derivative $f'$ cannot be zero in $A[T]$
as $a_0$ is a single root, we conclude that $f$ is linear
due to the fact that $K$ is separably algebraically closed.
Thus $A$ is henselian, see
Algebra, Definition \ref{algebra-definition-henselian}.
\end{proof}

\begin{lemma}
\label{lemma-inertia-base-change}
Let $G$ be a finite group acting on a ring $R$. Let $R^G \to A$ be a ring
map. Let $\mathfrak q' \subset A \otimes_{R^G} R$ be a prime lying
over the prime $\mathfrak q \subset R$. Then
$$
I_\mathfrak q = \{\sigma \in G \mid
\sigma(\mathfrak q) = \mathfrak q\text{ and }
\sigma \bmod \mathfrak q = \text{id}_{\kappa(\mathfrak q)}\}
$$
is equal to
$$
I_{\mathfrak q'} = \{\sigma \in G \mid
\sigma(\mathfrak q') = \mathfrak q'\text{ and }
\sigma \bmod \mathfrak q' = \text{id}_{\kappa(\mathfrak q')}\}
$$
\end{lemma}

\begin{proof}
Since $\mathfrak q$ is the inverse image of $\mathfrak q'$
and since $\kappa(\mathfrak q) \subset \kappa(\mathfrak q')$,
we get $I_{\mathfrak q'} \subset I_\mathfrak q$.
Conversely, if $\sigma \in I_\mathfrak q$, the $\sigma$
acts trivially on the fibre ring $A \otimes_{R^G} \kappa(\mathfrak q)$.
Thus $\sigma$ fixes all the primes lying over $\mathfrak q$
and induces the identity on their residue fields.
\end{proof}

\begin{lemma}
\label{lemma-inertia-invariants-etale}
Let $G$ be a finite group acting on a ring $R$. Let $\mathfrak q \subset R$
be a prime. Set
$$
I = \{\sigma \in G \mid \sigma(\mathfrak q) = \mathfrak q
\text{ and } \sigma \bmod \mathfrak q = \text{id}_\mathfrak q\}
$$
Then $R^G \to R^I$ is \'etale at $R^I \cap \mathfrak q$.
\end{lemma}

\begin{proof}
The strategy of the proof is to use \'etale localization to
reduce to the case where $R \to R^I$ is a local isomorphism at
$R^I \cap \mathfrak p$.
Let $R^G \to A$ be an \'etale ring map. We claim that if the result
holds for the action of $G$ on $A \otimes_{R^G} R$ and some prime
$\mathfrak q'$ of $A \otimes_{R^G} R$ lying over $\mathfrak q$, then
the result is true.

\medskip\noindent
To check this, note that since $R^G \to A$ is flat we have
$A = (A \otimes_{R^G} R)^G$, see More on Algebra,
Lemma \ref{more-algebra-lemma-base-change-invariants}.
By Lemma \ref{lemma-inertia-base-change} the group $I$ does not change.
Then a second application of More on Algebra,
Lemma \ref{more-algebra-lemma-base-change-invariants}
shows that $A \otimes_{R^G} R^I = (A \otimes_{R^G} R)^I$
(because $R^I \to A \otimes_{R^G} R^I$ is flat).
Thus
$$
\xymatrix{
\Spec((A \otimes_{R^G} R)^I) \ar[d] \ar[r] & \Spec(R^I) \ar[d] \\
\Spec(A) \ar[r] & \Spec(R^G)
}
$$
is cartesian and the horizontal arrows are \'etale. Thus if the
left vertical arrow is \'etale in some open neighbourhood $W$ of
$(A \otimes_{R^G} R)^I \cap \mathfrak q'$, then the right vertical
arrow is \'etale at the points of the (open) image of $W$ in
$\Spec(R^I)$, see
Descent, Lemma \ref{descent-lemma-smooth-permanence}. In particular
the morphism $\Spec(R^I) \to \Spec(R^G)$ is \'etale at $R^I \cap \mathfrak q$.

\medskip\noindent
Let $\mathfrak p = R^G \cap \mathfrak q$.
By More on Algebra, Lemma \ref{more-algebra-lemma-one-orbit}
the fibre of $\Spec(R) \to \Spec(R^G)$ over $\mathfrak p$ is
finite. Moreover the residue field extensions at these points
are algebraic, normal, with finite automorphism groups by
More on Algebra, Lemma \ref{more-algebra-lemma-one-orbit-geometric}.
Thus we may apply
More on Morphisms,
Lemma \ref{more-morphisms-lemma-etale-makes-integral-split}
to the integral ring map $R^G \to R$ and the prime $\mathfrak p$.
Combined with the claim above we reduce to the case where
$R = A_1 \times \ldots \times A_n$ with each $A_i$ having a single
prime $\mathfrak q_i$ lying over $\mathfrak p$ such that the
residue field extensions $\kappa(\mathfrak q_i)/\kappa(\mathfrak p)$
are purely inseparable. Of course $\mathfrak q$ is one of
these primes, say $\mathfrak q = \mathfrak q_1$.

\medskip\noindent
It may not be the case that $G$ permutes the factors $A_i$
(this would be true if the spectrum of $A_i$ were connected,
for example if $R^G$ was local). This we can fix as follows;
we suggest the reader think this through for themselves, perhaps
using idempotents instead of topology.
Recall that the product decomposition gives a corresponding
disjoint union decomposition of $\Spec(R)$ by open and closed
subsets $U_i$. Since $G$ is finite, we can refine this covering
by a finite disjoint union decomposition
$\Spec(R) = \coprod_{j \in J} W_j$ by open
and closed subsets $W_j$, such that for all $j \in J$ there exists
a $j' \in J$ with $\sigma(W_j) = W_{j'}$. The union of the
$W_j$ not meeting $\{\mathfrak q_1, \ldots, \mathfrak q_n\}$
is a closed subset not meeting the fibre over $\mathfrak p$
hence maps to a closed subset of $\Spec(R^G)$ not meeting
$\mathfrak p$ as $\Spec(R) \to \Spec(R^G)$ is closed.
Hence after replacing $R^G$ by a principal localization
(permissible by the claim) we may assume each $W_j$ meets
one of the points $\mathfrak q_i$. Then we set $U_i = W_j$
if $\mathfrak q_i \in W_j$. The corresponding product decomposition
$R = A_1 \times \ldots \times A_n$ is one
where $G$ permutes the factors $A_i$.

\medskip\noindent
Thus we may assume we have a product decomposition
$R = A_1 \times \ldots \times A_n$ compatible with $G$-action,
where each $A_i$ has a single prime $\mathfrak q_i$ lying
over $\mathfrak p$ and the field extensions
$\kappa(\mathfrak q_i)/\kappa(\mathfrak p)$ are purely inseparable.
Write $A' = A_2 \times \ldots \times A_n$ so that
$$
R = A_1 \times A'
$$
Since $\mathfrak q = \mathfrak q_1$ we find that every
$\sigma \in I$ preserves the product decomposition above.
Hence
$$
R^I = (A_1)^I \times (A')^I
$$
Observe that $I = D = \{\sigma \in G \mid \sigma(\mathfrak q) = \mathfrak q\}$
because $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is purely inseparable.
Since the action of $G$ on primes over $\mathfrak p$ is transitive
(More on Algebra, Lemma \ref{more-algebra-lemma-one-orbit})
we conclude that, the index of $I$ in $G$ is $n$ and we can write
$G = eI \amalg \sigma_2I \amalg \ldots \amalg \sigma_nI$ so that
$A_i = \sigma_i(A_1)$ for $i = 2, \ldots, n$. It follows that
$$
R^G = (A_1)^I.
$$
Thus the map $R^G \to R^I$ is \'etale at $R^I \cap \mathfrak q$
and the proof is complete.
\end{proof}

\noindent
The following lemma generalizes
More on Algebra, Lemma \ref{more-algebra-lemma-inertial-invariants-unramified}.

\begin{lemma}
\label{lemma-inertial-invariants-unramified}
Let $A$ be a normal domain with fraction field $K$.
Let $L/K$ be a (possibly infinite) Galois extension.
Let $G = \text{Gal}(L/K)$ and let
$B$ be the integral closure of $A$ in $L$.
Let $\mathfrak q \subset B$. Set
$$
I = \{\sigma \in G \mid
\sigma(\mathfrak q) = \mathfrak q \text{ and }
\sigma \bmod \mathfrak q = \text{id}_{\kappa(\mathfrak q)}\}
$$
Then $(B^I)_{B^I \cap \mathfrak q}$ is a filtered colimit
of \'etale $A$-algebras.
\end{lemma}

\begin{proof}
We can write $L$ as the filtered colimit of finite Galois extensions
of $K$. Hence it suffices to prove this lemma in case $L/K$ is
a finite Galois extension, see
Algebra, Lemma \ref{algebra-lemma-colimit-colimit-etale}.
Since $A = B^G$ as $A$ is integrally
closed in $K = L^G$ the result follows from
Lemma \ref{lemma-inertia-invariants-etale}.
\end{proof}







\section{Ramification theory}
\label{section-ramification}

\noindent
In this section we continue the discussion of
More on Algebra, Section \ref{more-algebra-section-ramification}
and we relate it to our discussion of the fundamental groups of schemes.

\medskip\noindent
Let $(A, \mathfrak m, \kappa)$ be a normal local ring with
fraction field $K$. Choose a separable algebraic closure $K^{sep}$. Let
$A^{sep}$ be the integral closure of $A$ in $K^{sep}$.
Choose maximal ideal $\mathfrak m^{sep} \subset A^{sep}$.
Let $A \subset A^h \subset A^{sh}$ be the henselization and strict
henselization. Observe that $A^h$ and $A^{sh}$ are normal rings as well
(More on Algebra, Lemma \ref{more-algebra-lemma-henselization-normal}).
Denote $K^h$ and $K^{sh}$ their fraction fields.
Since $(A^{sep})_{\mathfrak m^{sep}}$ is strictly henselian by
Lemma \ref{lemma-normal-local-domain-separablly-closed-fraction-field}
we can choose an $A$-algebra map $A^{sh} \to (A^{sep})_{\mathfrak m^{sep}}$.
Namely, first choose a $\kappa$-embedding\footnote{This is possible
because $\kappa(\mathfrak m^{sh})$ is a separable algebraic closure
of $\kappa$ and $\kappa(\mathfrak m^{sep})$ is an algebraic closure
of $\kappa$ by Lemma \ref{lemma-get-algebraic-closure}.}
$\kappa(\mathfrak m^{sh}) \to \kappa(\mathfrak m^{sep})$ and
then extend (uniquely) to an $A$-algebra homomorphism by
Algebra, Lemma \ref{algebra-lemma-strictly-henselian-functorial}.
We get the following diagram
$$
\xymatrix{
K^{sep} & K^{sh} \ar[l] & K^h \ar[l] & K \ar[l] \\
(A^{sep})_{\mathfrak m^{sep}} \ar[u] &
A^{sh} \ar[u] \ar[l] &
A^h \ar[u] \ar[l] &
A \ar[u] \ar[l]
}
$$
We can take the fundamental groups of the spectra of these rings.
Of course, since $K^{sep}$, $(A^{sep})_{\mathfrak m^{sep}}$, and
$A^{sh}$ are strictly henselian, for them we obtain trivial groups.
Thus the interesting part is the following
\begin{equation}
\label{equation-inertia-diagram-pione}
\vcenter{
\xymatrix{
\pi_1(U^{sh}) \ar[r] \ar[rd]_1 & \pi_1(U^h) \ar[d] \ar[r] & \pi_1(U) \ar[d] \\
& \pi_1(X^h) \ar[r] & \pi_1(X)
}
}
\end{equation}
Here $X^h$ and $X$ are the spectra of $A^h$ and $A$ and
$U^{sh}$, $U^h$, $U$ are the spectra of $K^{sh}$, $K^h$, and $K$.
The label $1$ means that the map is trivial; this follows
as it factors through the trivial group $\pi_1(X^{sh})$.
On the other hand, the profinite group $G = \text{Gal}(K^{sep}/K)$
acts on $A^{sep}$ and we can make the following definitions
$$
D = \{\sigma \in G \mid \sigma(\mathfrak m^{sep}) = \mathfrak m^{sep}\}
\supset
I = \{\sigma \in D \mid \sigma \bmod \mathfrak m^{sep} =
\text{id}_{\kappa(\mathfrak m^{sep})}\}
$$
These groups are sometimes called the
{\it decomposition group} and the {\it inertia group}
especially when $A$ is a discrete valuation ring.

\begin{lemma}
\label{lemma-identify-inertia}
In the situation described above, via the isomorphism
$\pi_1(U) = \text{Gal}(K^{sep}/K)$ the diagram
(\ref{equation-inertia-diagram-pione})
translates into the diagram
$$
\xymatrix{
I \ar[r] \ar[rd]_1 & D \ar[d] \ar[r] & \text{Gal}(K^{sep}/K) \ar[d] \\
& \text{Gal}(\kappa(\mathfrak m^{sh})/\kappa) \ar[r] & \text{Gal}(M/K)
}
$$
where $K^{sep}/M/K$ is the maximal subextension unramified
with respect to $A$. Moreover, the vertical arrows are surjective,
the kernel of the left vertical arrow is $I$ and the kernel of the
right vertical arrow is
the smallest closed normal subgroup of $\text{Gal}(K^{sep}/K)$
containing $I$.
\end{lemma}

\begin{proof}
By construction the group $D$ acts on $(A^{sep})_{\mathfrak m^{sep}}$
over $A$. By the uniqueness of $A^{sh} \to (A^{sep})_{\mathfrak m^{sep}}$
given the map on residue fields
(Algebra, Lemma \ref{algebra-lemma-strictly-henselian-functorial})
we see that the image of $A^{sh} \to (A^{sep})_{\mathfrak m^{sep}}$
is contained in $((A^{sep})_{\mathfrak m^{sep}})^I$.
On the other hand,
Lemma \ref{lemma-inertial-invariants-unramified}
shows that $((A^{sep})_{\mathfrak m^{sep}})^I$
is a filtered colimit of \'etale extensions of $A$.
Since $A^{sh}$ is the maximal such extension, we conclude
that $A^{sh} = ((A^{sep})_{\mathfrak m^{sep}})^I$.
Hence $K^{sh} = (K^{sep})^I$.

\medskip\noindent
Recall that $I$ is the kernel of a surjective map
$D \to \text{Aut}(\kappa(\mathfrak m^{sep})/\kappa)$, see
More on Algebra, Lemma \ref{more-algebra-lemma-one-orbit-geometric-galois}.
We have $\text{Aut}(\kappa(\mathfrak m^{sep})/\kappa) =
\text{Gal}(\kappa(\mathfrak m^{sh})/\kappa)$
as we have seen above that these fields are the algebraic
and separable algebraic closures of $\kappa$.
On the other hand, any automorphism of $A^{sh}$ over $A$
is an automorphism of $A^{sh}$ over $A^h$ by the uniqueness
in Algebra, Lemma \ref{algebra-lemma-henselian-functorial}.
Furthermore, $A^{sh}$ is the colimit of finite \'etale
extensions $A^h \subset A'$ which correspond $1$-to-$1$
with finite separable extension $\kappa'/\kappa$, see
Algebra, Remark \ref{algebra-remark-construct-sh-from-h}.
Thus
$$
\text{Aut}(A^{sh}/A) = \text{Aut}(A^{sh}/A^h) =
\text{Gal}(\kappa(\mathfrak m^{sh})/\kappa)
$$
Let $\kappa'/\kappa$ be a finite Galois extension with
Galois group $G$. Let $A^h \subset A'$ be the finite \'etale extension
corresponding to $\kappa \subset \kappa'$ by
Algebra, Lemma \ref{algebra-lemma-henselian-cat-finite-etale}.
Then it follows that
$(A')^G = A^h$ by looking at fraction fields and degrees
(small detail omitted). Taking the colimit we conclude that
$(A^{sh})^{\text{Gal}(\kappa(\mathfrak m^{sh})/\kappa)} = A^h$.
Combining all of the above, we find $A^h = ((A^{sep})_{\mathfrak m^{sep}})^D$.
Hence $K^h = (K^{sep})^D$.

\medskip\noindent
Since $U$, $U^h$, $U^{sh}$ are the spectra of the fields
$K$, $K^h$, $K^{sh}$ we see that the top lines of the diagrams
correspond via
Lemma \ref{lemma-fundamental-group-Galois-group}.
By Lemma \ref{lemma-gabber} we have
$\pi_1(X^h) = \text{Gal}(\kappa(\mathfrak m^{sh})/\kappa)$.
The exactness of the sequence
$1 \to I \to D \to \text{Gal}(\kappa(\mathfrak m^{sh})/\kappa) \to 1$
was pointed out above.
By Proposition \ref{proposition-normal}
we see that $\pi_1(X) = \text{Gal}(M/K)$.
Finally, the statement on the kernel of
$\text{Gal}(K^{sep}/K) \to \text{Gal}(M/K) = \pi_1(X)$
follows from Lemma \ref{lemma-local-exact-sequence-normal}.
This finishes the proof.
\end{proof}

\noindent
Let $X$ be a normal integral scheme with function field $K$.
Let $K^{sep}$ be a separable algebraic closure of $K$.
Let $X^{sep} \to X$ be the normalization of $X$ in $K^{sep}$.
Since $G = \text{Gal}(K^{sep}/K)$ acts on $K^{sep}$
we obtain a right action of $G$ on $X^{sep}$.
For $y \in X^{sep}$ define
$$
D_y = \{\sigma \in G \mid \sigma(y) = y\} \supset
I_y = \{\sigma \in D \mid \sigma \bmod \mathfrak m_y =
\text{id}_{\kappa(y)} \}
$$
similarly to the above. On the other hand, for $x \in X$
let $\mathcal{O}_{X, x}^{sh}$ be a strict henselization,
let $K_x^{sh}$ be the fraction field of $\mathcal{O}_{X, x}^{sh}$
and choose a $K$-embedding $K_x^{sh} \to K^{sep}$.

\begin{lemma}
\label{lemma-normal-pione-quotient-inertia}
Let $X$ be a normal integral scheme with function field $K$.
With notation as above, the following three subgroups of
$\text{Gal}(K^{sep}/K) = \pi_1(\Spec(K))$
are equal
\begin{enumerate}
\item the kernel of the surjection
$\text{Gal}(K^{sep}/K) \longrightarrow \pi_1(X)$,
\item the smallest normal closed subgroup containing $I_y$
for all $y \in X^{sep}$, and
\item the smallest normal closed subgroup containing
$\text{Gal}(K^{sep}/K_x^{sh})$ for all $x \in  X$.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (2) and (3) follows from
Lemma \ref{lemma-identify-inertia}
which tells us that $I_y$ is conjugate to $\text{Gal}(K^{sep}/K_x^{sh})$
if $y$ lies over $x$. By Lemma \ref{lemma-local-exact-sequence-normal}
we see that $\text{Gal}(K^{sep}/K_x^{sh})$ maps trivially to
$\pi_1(\Spec(\mathcal{O}_{X, x}))$ and therefore the subgroup
$N \subset G = \text{Gal}(K^{sep}/K)$
of (2) and (3) is contained in the kernel of
$G \longrightarrow \pi_1(X)$.

\medskip\noindent
To prove the other inclusion, since $N$ is normal, it suffices to prove:
given $N \subset U \subset G$ with $U$ open normal,
the quotient map $G \to G/U$ factors through $\pi_1(X)$.
In other words, if $L/K$ is the Galois extension corresponding
to $U$, then we have to show that $X$ is unramified in $L$
(Section \ref{section-normal}, especially
Proposition \ref{proposition-normal}).
It suffices to do this when $X$ is affine (we do this
so we can refer to algebra results in the rest of the proof).
Let $Y \to X$ be the normalization of $X$ in $L$.
The inclusion $L \subset K^{sep}$ induces a morphism
$\pi : X^{sep} \to Y$. For $y \in X^{sep}$
the inertia group of $\pi(y)$ in $\text{Gal}(L/K)$
is the image of $I_y$ in $\text{Gal}(L/K)$; this follows
from More on Algebra, Lemma
\ref{more-algebra-lemma-one-orbit-geometric-galois-compare}.
Since $N \subset U$ all these inertia groups are trivial.
We conclude that $Y \to X$ is \'etale by applying
Lemma \ref{lemma-inertia-invariants-etale}.
(Alternative: you can use Lemma \ref{lemma-local-exact-sequence-normal}
to see that the pullback of $Y$ to $\Spec(\mathcal{O}_{X, x})$ is
\'etale for all $x \in X$ and then conclude from there
with a bit more work.)
\end{proof}

\begin{example}
\label{example-bigger-codim}
Let $X$ be a normal integral Noetherian scheme with function field $K$.
Purity of branch locus (see below) tells us that if $X$ is regular, then
it suffices in Lemma \ref{lemma-normal-pione-quotient-inertia}
to consider the inertia groups $I = \pi_1(\Spec(K_x^{sh}))$
for points $x$ of codimension $1$ in $X$.
In general this is not enough however. Namely, let
$Y = \mathbf{A}_k^n = \Spec(k[t_1, \ldots, t_n])$
where $k$ is a field not of characteristic $2$.
Let $G = \{\pm 1\}$ be the group of order $2$ acting on $Y$
by multiplication on the coordinates. Set
$$
X = \Spec(k[t_it_j, i, j \in \{1, \ldots, n\}])
$$
The embedding $k[t_it_j] \subset k[t_1, \ldots, t_n]$
defines a degree $2$ morphism $Y \to X$ which is unramified everywhere
except over the maximal ideal $\mathfrak m = (t_it_j)$
which is a point of codimension $n$ in $X$.
\end{example}

\begin{lemma}
\label{lemma-unramified}
Let $X$ be an integral normal scheme with function field $K$.
Let $L/K$ be a finite extension. Let $Y \to X$ be the normalization
of $X$ in $L$. The following are equivalent
\begin{enumerate}
\item $X$ is unramified in $L$ as defined in Section \ref{section-normal},
\item $Y \to X$ is an unramified morphism of schemes,
\item $Y \to X$ is an \'etale morphism of schemes,
\item $Y \to X$ is a finite \'etale morphism of schemes,
\item for $x \in X$ the projection
$Y \times_X \Spec(\mathcal{O}_{X, x}) \to \Spec(\mathcal{O}_{X, x})$
is unramified,
\item same as in (5) but with $\mathcal{O}_{X, x}^h$,
\item same as in (5) but with $\mathcal{O}_{X, x}^{sh}$,
\item for $x \in X$ the scheme theoretic fibre $Y_x$
is \'etale over $x$ of degree $\geq [L : K]$.
\end{enumerate}
If $L/K$ is Galois with Galois group $G$, then these are also
equivalent to
\begin{enumerate}
\item[(9)] for $y \in Y$ the group
$I_y = \{g \in G \mid g(y) = y\text{ and }
g \bmod \mathfrak m_y = \text{id}_{\kappa(y)}\}$ is trivial.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (1) and (2) is the definition of (1).
The equivalence of (2), (3), and (4) is Lemma \ref{lemma-unramified-in-L}.
It is straightforward to prove that (4) $\Rightarrow$ (5),
(5) $\Rightarrow$ (6), (6) $\Rightarrow$ (7).

\medskip\noindent
Assume (7). Observe that $\mathcal{O}_{X, x}^{sh}$ is a normal local domain
(More on Algebra, Lemma \ref{more-algebra-lemma-henselization-normal}).
Let $L^{sh} = L \otimes_K K_x^{sh}$ where $K_x^{sh}$ is the fraction field
of $\mathcal{O}_{X, x}^{sh}$. Then $L^{sh} = \prod_{i = 1, \ldots, n} L_i$
with $L_i/K_x^{sh}$ finite separable. By
Algebra, Lemma \ref{algebra-lemma-integral-closure-commutes-smooth}
(and a limit argument we omit)
we see that $Y \times_X \Spec(\mathcal{O}_{X, x}^{sh})$
is the integral closure of $\Spec(\mathcal{O}_{X, x}^{sh})$ in $L^{sh}$.
Hence by Lemma \ref{lemma-unramified-in-L} (applied to the factors
$L_i$ of $L^{sh}$) we see that
$Y \times_X \Spec(\mathcal{O}_{X, x}^{sh}) \to \Spec(\mathcal{O}_{X, x}^{sh})$
is finite \'etale. Looking at the generic point we see that
the degree is equal to $[L : K]$ and hence we see that (8) is true.

\medskip\noindent
Assume (8). Assume that $x \in X$ and that the scheme theoretic fibre $Y_x$
is \'etale over $x$ of degree $\geq [L : K]$. Observe that this means
that $Y$ has $\geq [L : K]$ geometric points lying over $x$.
We will show that $Y \to X$ is finite \'etale over a neighbourhood of $x$.
This will prove (1) holds.
To prove this we may assume $X = \Spec(R)$, the point $x$ corresponds to
the prime $\mathfrak p \subset R$, and $Y = \Spec(S)$. We apply
More on Morphisms,
Lemma \ref{more-morphisms-lemma-etale-makes-integral-split} and we find an
\'etale neighbourhood $(U, u) \to (X, x)$ such that
$Y \times_X U = V_1 \amalg \ldots \amalg V_m$ such that $V_i$
has a unique point $v_i$ lying over $u$ with $\kappa(v_i)/\kappa(u)$
purely inseparable. Shrinking $U$ if necessary we may assume $U$ is
a normal integral scheme with generic point $\xi$ (use
Descent, Lemmas \ref{descent-lemma-locally-finite-nr-irred-local-fppf} and
\ref{descent-lemma-normal-local-smooth} and
Properties, Lemma \ref{properties-lemma-normal-locally-finite-nr-irreducibles}).
By our remark on geometric points we see that $m \geq [L : K]$.
On the other hand, by More on Morphisms, Lemma
\ref{more-morphisms-lemma-normalization-smooth-localization}
we see that $\coprod V_i \to U$ is the normalization of $U$ in
$\Spec(L) \times_X U$. As $K \subset \kappa(\xi)$ is finite separable,
we can write $\Spec(L) \times_X U = \Spec(\prod_{i = 1, \ldots, n} L_i)$
with $L_i/\kappa(\xi)$ finite and $[L : K] = \sum [L_i : \kappa(\xi)]$.
Since $V_j$ is nonempty for each $j$ and $m \geq [L : K]$
we conclude that $m = n$ and $[L_i : \kappa(\xi)] = 1$
for all $i$. Then $V_j \to U$ is an isomorphism in particular
\'etale, hence $Y \times_X U \to U$ is \'etale. By
Descent, Lemma \ref{descent-lemma-descending-property-etale}
we conclude that $Y \to X$ is \'etale over the
image of $U \to X$ (an open neighbourhood of $x$).

\medskip\noindent
Assume $L/K$ is Galois and (9) holds. Then $Y \to X$ is \'etale
by Lemma \ref{lemma-inertial-invariants-unramified}.
We omit the proof that (1) implies (9).
\end{proof}

\noindent
In the case of infinite Galois extensions of discrete valuation rings
we can say a tiny bit more. To do so we introduce the following notation.
A subset $S \subset \mathbf{N}$ of integers is {\it multiplicativity directed}
if $1 \in S$ and for $n, m \in S$ there exists $k \in S$ with
$n | k$ and $m | k$. Define a partial ordering on $S$ by the rule
$n \geq_S m$ if and only if $m | n$. Given a field $\kappa$ we obtain
an inverse system of finite groups $\{\mu_n(\kappa)\}_{n \in S}$
with transition maps
$$
\mu_n(\kappa) \longrightarrow \mu_m(\kappa),\quad
\zeta \longmapsto \zeta^{n/m}
$$
for $n \geq_S m$. Then we can form the profinite group
$$
\lim_{n \in S} \mu_n(\kappa)
$$
Observe that the limit is cofiltered (as $S$ is directed).
The construction is functorial in $\kappa$. In particular
$\text{Aut}(\kappa)$ acts on this profinite group.
For example, if $S = \{1, n\}$, then this gives $\mu_n(\kappa)$.
If $S = \{1, \ell, \ell^2, \ell^3, \ldots\}$ for some prime
$\ell$ different from the characteristic of $\kappa$ this produces
$\lim_n \mu_{\ell^n}(\kappa)$
which is sometimes called the $\ell$-adic Tate module of the multiplicative
group of $\kappa$ (compare with
More on Algebra, Example
\ref{more-algebra-example-spectral-sequence-principal}).

\begin{lemma}
\label{lemma-structure-decomposition}
Let $A$ be a discrete valuation ring with fraction field $K$.
Let $L/K$ be a (possibly infinite) Galois extension.
Let $B$ be the integral closure of $A$ in $L$.
Let $\mathfrak m$ be a maximal ideal of $B$.
Let $G = \text{Gal}(L/K)$,
$D = \{\sigma \in G \mid \sigma(\mathfrak m) = \mathfrak m\}$, and
$I = \{\sigma \in D \mid \sigma \bmod \mathfrak m =
\text{id}_{\kappa(\mathfrak m)}\}$.
The decomposition group $D$ fits into a canonical exact sequence
$$
1 \to I \to D \to \text{Aut}(\kappa(\mathfrak m)/\kappa_A) \to 1
$$
The inertia group $I$ fits into a canonical exact sequence
$$
1 \to P \to I \to I_t \to 1
$$
such that
\begin{enumerate}
\item $P$ is a normal subgroup of $D$,
\item $P$ is a pro-$p$-group if the characteristic of
$\kappa_A$ is $p > 1$ and $P = \{1\}$ if the characteristic of $\kappa_A$
is zero,
\item there is a multiplicatively directed $S \subset \mathbf{N}$
such that $\kappa(\mathfrak m)$ contains a primitive $n$th root of unity
for each $n \in S$ (elements of $S$ are prime to $p$),
\item there exists a canonical surjective map
$$
\theta_{can} : I \to \lim_{n \in S} \mu_n(\kappa(\mathfrak m))
$$
whose kernel is $P$, which satisfies
$\theta_{can}(\tau \sigma \tau^{-1}) = \tau(\theta_{can}(\sigma))$
for $\tau \in D$, $\sigma \in I$, and which induces an isomorphism
$I_t \to \lim_{n \in S} \mu_n(\kappa(\mathfrak m))$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is mostly a reformulation of the results on finite Galois extensions
proved in More on Algebra, Section \ref{more-algebra-section-ramification}.
The surjectivity of the map $D \to \text{Aut}(\kappa(\mathfrak m)/\kappa)$ is
More on Algebra, Lemma \ref{more-algebra-lemma-one-orbit-geometric-galois}.
This gives the first exact sequence.

\medskip\noindent
To construct the second short exact sequence let $\Lambda$ be the set
of finite Galois subextensions, i.e., $\lambda \in \Lambda$ corresponds
to $L/L_\lambda/K$. Set $G_\lambda = \text{Gal}(L_\lambda/K)$.
Recall that $G_\lambda$ is an inverse system of finite groups with surjective
transition maps and that $G = \lim_{\lambda \in \Lambda} G_\lambda$, see
Fields, Lemma \ref{fields-lemma-infinite-galois-limit}.
We let $B_\lambda$ be the integral closure of $A$ in $L_\lambda$.
Then we set $\mathfrak m_\lambda = \mathfrak m \cap B_\lambda$
and we denote $P_\lambda, I_\lambda, D_\lambda$ the
wild inertia, inertia, and decomposition group of
$\mathfrak m_\lambda$, see More on Algebra, Lemma
\ref{more-algebra-lemma-galois-inertia}.
For $\lambda \geq \lambda'$ the restriction defines
a commutative diagram
$$
\xymatrix{
P_\lambda \ar[d] \ar[r] &
I_\lambda \ar[d] \ar[r] &
D_\lambda \ar[d] \ar[r] &
G_\lambda \ar[d] \\
P_{\lambda'} \ar[r] &
I_{\lambda'} \ar[r] &
D_{\lambda'} \ar[r] &
G_{\lambda'}
}
$$
with surjective vertical maps, see
More on Algebra, Lemma \ref{more-algebra-lemma-compare-inertia}.

\medskip\noindent
From the definitions it follows immediately
that $I = \lim I_\lambda$ and $D = \lim D_\lambda$
under the isomorphism $G = \lim G_\lambda$ above.
Since $L = \colim L_\lambda$ we have $B = \colim B_\lambda$
and $\kappa(\mathfrak m) = \colim \kappa(\mathfrak m_\lambda)$.
Since the transition maps of the system $D_\lambda$
are compatible with the maps
$D_\lambda \to \text{Aut}(\kappa(\mathfrak m_\lambda)/\kappa)$
(see More on Algebra, Lemma \ref{more-algebra-lemma-compare-inertia})
we see that the map $D \to \text{Aut}(\kappa(\mathfrak m)/\kappa)$
is the limit of the maps
$D_\lambda \to \text{Aut}(\kappa(\mathfrak m_\lambda)/\kappa)$.

\medskip\noindent
There exist canonical maps
$$
\theta_{\lambda, can} :
I_\lambda
\longrightarrow
\mu_{n_\lambda}(\kappa(\mathfrak m_\lambda))
$$
where $n_\lambda = |I_\lambda|/|P_\lambda|$, where
$\mu_{n_\lambda}(\kappa(\mathfrak m_\lambda))$ has
order $n_\lambda$, such that
$\theta_{\lambda, can}(\tau \sigma \tau^{-1}) =
\tau(\theta_{\lambda, can}(\sigma))$ for
$\tau \in D_\lambda$ and $\sigma \in I_\lambda$, and such that
we get commutative diagrams
$$
\xymatrix{
I_\lambda \ar[r]_-{\theta_{\lambda, can}} \ar[d] &
\mu_{n_\lambda}(\kappa(\mathfrak m_\lambda))
\ar[d]^{(-)^{n_\lambda/n_{\lambda'}}} \\
I_{\lambda'} \ar[r]^-{\theta_{\lambda', can}} &
\mu_{n_{\lambda'}}(\kappa(\mathfrak m_{\lambda'}))
}
$$
see
More on Algebra, Remark \ref{more-algebra-remark-canonical-inertia-character}.

\medskip\noindent
Let $S \subset \mathbf{N}$ be the collection of integers $n_\lambda$.
Since $\Lambda$ is directed, we see that $S$ is multiplicatively directed.
By the displayed commutative diagrams above we can take the limits of
the maps $\theta_{\lambda, can}$ to obtain
$$
\theta_{can} : I \to \lim_{n \in S} \mu_n(\kappa(\mathfrak m)).
$$
This map is continuous (small detail omitted). Since the transition maps
of the system of $I_\lambda$ are surjective
and $\Lambda$ is directed, the projections $I \to I_\lambda$
are surjective. For every $\lambda$ the diagram
$$
\xymatrix{
I \ar[d] \ar[r]_-{\theta_{can}} &
\lim_{n \in S} \mu_n(\kappa(\mathfrak m)) \ar[d] \\
I_{\lambda} \ar[r]^-{\theta_{\lambda, can}} &
\mu_{n_\lambda}(\kappa(\mathfrak m_\lambda))
}
$$
commutes. Hence the image of $\theta_{can}$ surjects onto the finite group
$\mu_{n_\lambda}(\kappa(\mathfrak m)) =
\mu_{n_\lambda}(\kappa(\mathfrak m_\lambda))$ of order $n_\lambda$
(see above). It follows that the image of $\theta_{can}$ is dense.
On the other hand $\theta_{can}$ is continuous and the
source is a profinite group. Hence $\theta_{can}$ is surjective
by a topological argument.

\medskip\noindent
The property $\theta_{can}(\tau \sigma \tau^{-1}) = \tau(\theta_{can}(\sigma))$
for $\tau \in D$, $\sigma \in I$ follows from the corresponding properties
of the maps $\theta_{\lambda, can}$ and the compatibility of the map
$D \to \text{Aut}(\kappa(\mathfrak m))$ with the maps
$D_\lambda \to \text{Aut}(\kappa(\mathfrak m_\lambda))$.
Setting $P = \Ker(\theta_{can})$ this implies
that $P$ is a normal subgroup of $D$. Setting $I_t = I/P$
we obtain the isomorphism $I_t \to \lim_{n \in S} \mu_n(\kappa(\mathfrak m))$
from the surjectivity of $\theta_{can}$.

\medskip\noindent
To finish the proof we show that $P = \lim P_\lambda$ which proves
that $P$ is a pro-$p$-group. Recall that the tame inertia group
$I_{\lambda, t} = I_\lambda/P_\lambda$ has order $n_\lambda$.
Since the transition maps $P_\lambda \to P_{\lambda'}$ are surjective
and $\Lambda$ is directed, we obtain a short exact sequence
$$
1 \to \lim P_\lambda \to I \to \lim I_{\lambda, t} \to 1
$$
(details omitted). Since for each $\lambda$ the map $\theta_{\lambda, can}$
induces an isomorphism
$I_{\lambda, t} \cong \mu_{n_\lambda}(\kappa(\mathfrak m))$
the desired result follows.
\end{proof}

\begin{lemma}
\label{lemma-structure-decomposition-separable-closure}
Let $A$ be a discrete valuation ring with fraction field $K$.
Let $K^{sep}$ be a separable closure of $K$.
Let $A^{sep}$ be the integral closure of $A$ in $K^{sep}$.
Let $\mathfrak m^{sep}$ be a maximal ideal of $A^{sep}$.
Let $\mathfrak m = \mathfrak m^{sep} \cap A$, let
$\kappa = A/\mathfrak m$, and let
$\overline{\kappa} = A^{sep}/\mathfrak m^{sep}$.
Then $\overline{\kappa}$ is an algebraic closure of $\kappa$.
Let $G = \text{Gal}(K^{sep}/K)$,
$D = \{\sigma \in G \mid \sigma(\mathfrak m^{sep}) = \mathfrak m^{sep}\}$, and
$I = \{\sigma \in D \mid \sigma \bmod \mathfrak m^{sep} =
\text{id}_{\kappa(\mathfrak m^{sep})}\}$.
The decomposition group $D$ fits into a canonical exact sequence
$$
1 \to I \to D \to \text{Gal}(\kappa^{sep}/\kappa) \to 1
$$
where $\kappa^{sep} \subset \overline{\kappa}$ is the separable
closure of $\kappa$.
The inertia group $I$ fits into a canonical exact sequence
$$
1 \to P \to I \to I_t \to 1
$$
such that
\begin{enumerate}
\item $P$ is a normal subgroup of $D$,
\item $P$ is a pro-$p$-group if the characteristic of
$\kappa_A$ is $p > 1$ and $P = \{1\}$ if the characteristic of $\kappa_A$
is zero,
\item there exists a canonical surjective map
$$
\theta_{can} : I \to \lim_{n\text{ prime to }p} \mu_n(\kappa^{sep})
$$
whose kernel is $P$, which satisfies
$\theta_{can}(\tau \sigma \tau^{-1}) = \tau(\theta_{can}(\sigma))$
for $\tau \in D$, $\sigma \in I$, and which induces an isomorphism
$I_t \to \lim_{n\text{ prime to }p} \mu_n(\kappa^{sep})$.
\end{enumerate}
\end{lemma}

\begin{proof}
The field $\overline{\kappa}$ is the algebraic closure of $\kappa$ by
Lemma \ref{lemma-get-algebraic-closure}.
Most of the statements immediately follow from the corresponding
parts of Lemma \ref{lemma-structure-decomposition}. For example because
$\text{Aut}(\overline{\kappa}/\kappa) = \text{Gal}(\kappa^{sep}/\kappa)$
we obtain the first sequence.
Then the only other assertion that needs a proof is the fact that
with $S$ as in Lemma \ref{lemma-structure-decomposition} the
limit $\lim_{n \in S} \mu_n(\overline{\kappa})$ is equal to
$\lim_{n\text{ prime to }p} \mu_n(\kappa^{sep})$. To see this
it suffices to show that every integer $n$ prime to $p$
divides an element of $S$.
Let $\pi \in A$ be a uniformizer and consider the splitting
field $L$ of the polynomial $X^n - \pi$. Since the polynomial
is separable we see that $L$ is a finite Galois extension of $K$.
Choose an embedding $L \to K^{sep}$.
Observe that if $B$ is the integral closure of $A$ in $L$,
then the ramification index of $A \to B_{\mathfrak m^{sep} \cap B}$
is divisible by $n$ (because $\pi$ has an $n$th root in $B$; in fact
the ramification index equals $n$ but we do not need this).
Then it follows from the construction of the $S$ in the proof of
Lemma \ref{lemma-structure-decomposition}
that $n$ divides an element of $S$.
\end{proof}








\section{Geometric and arithmetic fundamental groups}
\label{section-galois-action}

\noindent
In this section we work out what happens when comparing the
fundamental group of a scheme $X$ over a field $k$ with the
fundamental group of $X_{\overline{k}}$ where $\overline{k}$
is the algebraic closure of $k$.

\begin{lemma}
\label{lemma-limit}
Let $I$ be a directed set. Let $X_i$ be an
inverse system of quasi-compact and quasi-separated schemes
over $I$ with affine transition morphisms.
Let $X = \lim X_i$ as in Limits, Section \ref{limits-section-limits}.
Then there is an equivalence of categories
$$
\colim \textit{F\'Et}_{X_i} = \textit{F\'Et}_X
$$
If $X_i$ is connected for all sufficiently large $i$ and $\overline{x}$
is a geometric point of $X$, then
$$
\pi_1(X, \overline{x}) = \lim \pi_1(X_i, \overline{x})
$$
\end{lemma}

\begin{proof}
The equivalence of categories follows from Limits, Lemmas
\ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-finite-finite-presentation}, and
\ref{limits-lemma-descend-etale}.
The second statement is formal given the statement on
categories.
\end{proof}

\begin{lemma}
\label{lemma-perfection}
Let $k$ be a field with perfection $k^{perf}$. Let $X$ be a connected scheme
over $k$. Then $X_{k^{perf}}$ is connected and
$\pi_1(X_{k^{perf}}) \to \pi_1(X)$ is an isomorphism.
\end{lemma}

\begin{proof}
Special case of topological invariance of the fundamental group.
See Proposition \ref{proposition-universal-homeomorphism}.
To see that $\Spec(k^{perf}) \to \Spec(k)$ is a universal
homeomorphism you can use
Algebra, Lemma \ref{algebra-lemma-radicial-integral-bijective}.
\end{proof}

\begin{lemma}
\label{lemma-ses-field}
Let $k$ be a field with algebraic closure $\overline{k}$.
Let $X$ be a quasi-compact and quasi-separated scheme over $k$.
If the base change $X_{\overline{k}}$ is connected, then
there is a short exact sequence
$$
1 \to \pi_1(X_{\overline{k}}) \to \pi_1(X) \to \pi_1(\Spec(k)) \to 1
$$
of profinite topological groups.
\end{lemma}

\begin{proof}
Connected objects of $\textit{F\'Et}_{\Spec(k)}$ are of the form
$\Spec(k') \to \Spec(k)$ with $k'/k$ a finite separable extension.
Then $X_{\Spec{k'}}$ is connected, as the morphism
$X_{\overline{k}} \to X_{\Spec(k')}$ is surjective and
$X_{\overline{k}}$ is connected by assumption. Thus
$\pi_1(X) \to \pi_1(\Spec(k))$ is surjective by
Lemma \ref{lemma-functoriality-galois-surjective}.

\medskip\noindent
Before we go on, note that we may assume that $k$ is a perfect field.
Namely, we have $\pi_1(X_{k^{perf}}) = \pi_1(X)$ and
$\pi_1(\Spec(k^{perf})) = \pi_1(\Spec(k))$ by Lemma \ref{lemma-perfection}.

\medskip\noindent
It is clear that the composition of the functors
$\textit{F\'Et}_{\Spec(k)} \to \textit{F\'Et}_X \to
\textit{F\'Et}_{X_{\overline{k}}}$ sends objects to disjoint unions
of copies of $X_{\Spec(\overline{k})}$. Therefore the composition
$\pi_1(X_{\overline{k}}) \to \pi_1(X) \to \pi_1(\Spec(k))$
is the trivial homomorphism by Lemma \ref{lemma-composition-trivial}.

\medskip\noindent
Let $U \to X$ be a finite \'etale morphism with $U$ connected.
Observe that $U \times_X X_{\overline{k}} = U_{\overline{k}}$.
Suppose that $U_{\overline{k}} \to X_{\overline{k}}$
has a section $s : X_{\overline{k}} \to U_{\overline{k}}$.
Then $s(X_{\overline{k}})$ is an open connected component of
$U_{\overline{k}}$. For $\sigma \in \text{Gal}(\overline{k}/k)$
denote $s^\sigma$ the base change of $s$ by $\Spec(\sigma)$.
Since $U_{\overline{k}} \to X_{\overline{k}}$ is finite \'etale
it has only a finite number of sections. Thus
$$
\overline{T} = \bigcup s^\sigma(X_{\overline{k}})
$$
is a finite union and we see that $\overline{T}$ is a
$\text{Gal}(\overline{k}/k)$-stable open and closed subset.
By Varieties, Lemma \ref{varieties-lemma-closed-fixed-by-Galois}
we see that $\overline{T}$ is the inverse image of a closed
subset $T \subset U$. Since $U_{\overline{k}} \to U$ is open
(Morphisms, Lemma \ref{morphisms-lemma-scheme-over-field-universally-open})
we conclude that $T$ is open as well. As $U$ is connected we
see that $T = U$. Hence $U_{\overline{k}}$ is a (finite) disjoint
union of copies of $X_{\overline{k}}$. By
Lemma \ref{lemma-functoriality-galois-normal} we conclude that the image of
$\pi_1(X_{\overline{k}}) \to \pi_1(X)$ is normal.

\medskip\noindent
Let $V \to X_{\overline{k}}$ be a finite \'etale cover. Recall that
$\overline{k}$ is the union of finite separable extensions of $k$.
By Lemma \ref{lemma-limit} we find a finite separable extension $k'/k$
and a finite \'etale morphism $U \to X_{k'}$ such that
$V = X_{\overline{k}} \times_{X_{k'}} U =
U \times_{\Spec(k')} \Spec(\overline{k})$.
Then the composition $U \to X_{k'} \to X$ is finite \'etale
and $U \times_{\Spec(k)} \Spec(\overline{k})$
contains $V = U \times_{\Spec(k')} \Spec(\overline{k})$
as an open and closed subscheme. (Because $\Spec(\overline{k})$
is an open and closed subscheme of
$\Spec(k') \times_{\Spec(k)} \Spec(\overline{k})$ via
the multiplication map $k' \otimes_k \overline{k} \to \overline{k}$.) By
Lemma \ref{lemma-functoriality-galois-injective}
we conclude that $\pi_1(X_{\overline{k}}) \to \pi_1(X)$ is injective.

\medskip\noindent
Finally, we have to show that for any finite \'etale morphism
$U \to X$ such that $U_{\overline{k}}$ is a disjoint union
of copies of $X_{\overline{k}}$ there is a finite \'etale
morphism $V \to \Spec(k)$ and a surjection $V \times_{\Spec(k)} X \to U$.
See Lemma \ref{lemma-functoriality-galois-ses}.
Arguing as above using Lemma \ref{lemma-limit}
we find a finite separable extension $k'/k$
such that there is an isomorphism
$U_{k'} \cong \coprod_{i = 1, \ldots, n} X_{k'}$.
Thus setting $V = \coprod_{i = 1, \ldots, n} \Spec(k')$
we conclude.
\end{proof}






\section{Homotopy exact sequence}
\label{section-homotopy-exact-sequence}

\noindent
In this section we discuss the following result.
Let $f : X \to S$ be a flat proper morphism of
finite presentation whose
geometric fibres are connected and reduced.
Assume $S$ is connected and let $\overline{s}$
be a geometric point of $S$. Then there is an exact
sequence
$$
\pi_1(X_{\overline{s}}) \to \pi_1(X) \to \pi_1(S) \to 1
$$
of fundamental groups. See
Proposition \ref{proposition-first-homotopy-sequence}.

\begin{lemma}
\label{lemma-stein-factorization-etale}
\begin{reference}
\cite[Expose X, Proposition 1.2, p. 262]{SGA1}.
\end{reference}
Let $f : X \to S$ be a proper morphism of schemes.
Let $X \to S' \to S$ be the Stein factorization of $f$, see
More on Morphisms, Theorem
\ref{more-morphisms-theorem-stein-factorization-general}.
If $f$ is of finite presentation, flat, with geometrically
reduced fibres, then $S' \to S$ is finite \'etale.
\end{lemma}

\begin{proof}
This follows from Derived Categories of Schemes,
Lemma \ref{perfect-lemma-proper-flat-geom-red}
and the information contained in
More on Morphisms, Theorem
\ref{more-morphisms-theorem-stein-factorization-general}.
\end{proof}

\begin{proposition}
\label{proposition-first-homotopy-sequence}
Let $f : X \to S$ be a flat proper morphism of finite presentation whose
geometric fibres are connected and reduced. Assume $S$ is connected and
let $\overline{s}$ be a geometric point of $S$. Then there is an exact
sequence
$$
\pi_1(X_{\overline{s}}) \to \pi_1(X) \to \pi_1(S) \to 1
$$
of fundamental groups.
\end{proposition}

\begin{proof}
Let $Y \to X$ be a finite \'etale morphism. Consider the Stein factorization
$$
\xymatrix{
Y \ar[d] \ar[r] & X \ar[d] \\
T \ar[r] & S
}
$$
of $Y \to S$. By Lemma \ref{lemma-stein-factorization-etale}
the morphism $T \to S$ is finite \'etale. In this way we obtain
a functor $\textit{F\'Et}_X \to \textit{F\'Et}_S$.
For any finite \'etale morphism $U \to S$ a morphism
$Y \to U \times_S X$ over $X$ is the same thing as a morphism
$Y \to U$ over $S$ and such a morphism factors uniquely through
the Stein factorization, i.e., corresponds to a unique
morphism $T \to U$
(by the construction of the Stein factorization as a relative
normalization in More on Morphisms, Lemma
\ref{more-morphisms-lemma-stein-universally-closed}
and factorization by
Morphisms, Lemma \ref{morphisms-lemma-characterize-normalization}).
Thus we see that the functors
$\textit{F\'Et}_X \to \textit{F\'Et}_S$ and
$\textit{F\'Et}_S \to \textit{F\'Et}_X$ are adjoints.
Note that the Stein factorization of $U \times_S X \to S$ is
$U$, because the fibres of $U \times_S X \to U$ are geometrically connected.

\medskip\noindent
By the discussion above and
Categories, Lemma \ref{categories-lemma-adjoint-fully-faithful}
we conclude that
$\textit{F\'Et}_S \to \textit{F\'Et}_X$
is fully faithful, i.e., $\pi_1(X) \to \pi_1(S)$ is surjective
(Lemma \ref{lemma-functoriality-galois-surjective}).

\medskip\noindent
It is immediate that the composition
$\textit{F\'Et}_S \to \textit{F\'Et}_X \to \textit{F\'Et}_{X_{\overline{s}}}$
sends any $U$ to a disjoint union of copies of $X_{\overline{s}}$.
Hence $\pi_1(X_{\overline{s}}) \to \pi_1(X) \to \pi_1(S)$ is trivial
by Lemma \ref{lemma-composition-trivial}.

\medskip\noindent
Let $Y \to X$ be a finite \'etale morphism with $Y$ connected such that
$Y \times_X X_{\overline{s}}$ contains a connected component $Z$
isomorphic to $X_{\overline{s}}$. Consider the Stein factorization $T$
as above. Let $\overline{t} \in T_{\overline{s}}$ be the point corresponding
to the fibre $Z$. Observe that $T$ is connected (as the image of a connected
scheme) and by the surjectivity above $T \times_S X$ is connected.
Now consider the factorization
$$
\pi : Y \longrightarrow T \times_S X
$$
Let $\overline{x} \in X_{\overline{s}}$ be any closed point. Note that
$\kappa(\overline{t}) = \kappa(\overline{s}) = \kappa(\overline{x})$
is an algebraically closed field.
Then the fibre of $\pi$ over $(\overline{t}, \overline{x})$ consists
of a unique point, namely the unique point $\overline{z} \in Z$
corresponding to $\overline{x} \in X_{\overline{s}}$ via the
isomorphism $Z \to X_{\overline{s}}$. We conclude that the finite
\'etale morphism $\pi$ has degree $1$ in a neighbourhood of
$(\overline{t}, \overline{x})$. Since $T \times_S X$ is connected
it has degree $1$ everywhere and we find that $Y \cong T \times_S X$.
Thus $Y \times_X X_{\overline{s}}$ splits completely.
Combining all of the above we see that
Lemmas \ref{lemma-functoriality-galois-ses} and
\ref{lemma-functoriality-galois-normal}
both apply and the proof is complete.
\end{proof}




\section{Specialization maps}
\label{section-specialization-map}

\noindent
In this section we construct specialization maps.
Let $f : X \to S$ be a proper morphism of schemes
with geometrically connected fibres.
Let $s' \leadsto s$ be a specialization of points in $S$.
Let $\overline{s}$ and $\overline{s}'$ be geometric points
lying over $s$ and $s'$. Then there is a specialization map
$$
sp : \pi_1(X_{\overline{s}'}) \longrightarrow \pi_1(X_{\overline{s}})
$$
The construction of this map is as follows. Let $A$ be the
strict henselization of $\mathcal{O}_{S, s}$ with respect to
$\kappa(s) \subset \kappa(s)^{sep} \subset \kappa(\overline{s})$, see
Algebra, Definition \ref{algebra-definition-henselization}.
Since $s' \leadsto s$ the point $s'$ corresponds to a point of
$\Spec(\mathcal{O}_{S, s})$ and hence there is at least one point
(and potentially many points)
of $\Spec(A)$ over $s'$ whose residue field is a separable algebraic
extension of $\kappa(s')$.
Since $\kappa(\overline{s}')$ is algebraically closed we can choose
a morphism $\varphi : \overline{s}' \to \Spec(A)$ giving rise to a commutative
diagram
$$
\xymatrix{
\overline{s}' \ar[r]_-\varphi \ar[rd] &
\Spec(A) \ar[d] &
\overline{s} \ar[l] \ar[ld] \\
& S
}
$$
The specialization map is the composition
$$
\pi_1(X_{\overline{s}'}) \longrightarrow
\pi_1(X_A) =
\pi_1(X_{\kappa(s)^{sep}}) =
\pi_1(X_{\overline{s}})
$$
where the first equality is
Lemma \ref{lemma-finite-etale-on-proper-over-henselian}
and the second follows from
Lemmas \ref{lemma-perfection} and
\ref{lemma-finite-etale-invariant-over-proper}.
By construction the specialization map fits into a commutative
diagram
$$
\xymatrix{
\pi_1(X_{\overline{s}'}) \ar[rr]_{sp} \ar[rd] & &
\pi_1(X_{\overline{s}}) \ar[ld] \\
& \pi_1(X)
}
$$
provided that $X$ is connected. The specialization map depends on the
choice of $\varphi : \overline{s}' \to \Spec(A)$ above and we will
write $sp_\varphi$ if we want to indicate this.

\begin{lemma}
\label{lemma-specialization-map-base-change}
Consider a commutative diagram
$$
\xymatrix{
Y \ar[d]_g \ar[r] & X \ar[d]^f \\
T \ar[r] & S
}
$$
of schemes where $f$ and $g$ are proper with geometrically connected
fibres. Let $t' \leadsto t$ be a specialization of points in $T$
and consider a specialization map
$sp : \pi_1(Y_{\overline{t}'}) \to \pi_1(Y_{\overline{t}})$ as above.
Then there is a commutative diagram
$$
\xymatrix{
\pi_1(Y_{\overline{t}'}) \ar[r]_{sp} \ar[d] & \pi_1(Y_{\overline{t}}) \ar[d] \\
\pi_1(X_{\overline{s}'}) \ar[r]^{sp} & \pi_1(X_{\overline{s}})
}
$$
of specialization maps where $\overline{s}$ and $\overline{s}'$
are the images of $\overline{t}$ and $\overline{t}'$.
\end{lemma}

\begin{proof}
Let $B$ be the strict henselization of $\mathcal{O}_{T, t}$ with respect to
$\kappa(t) \subset \kappa(t)^{sep} \subset \kappa(\overline{t})$.
Pick $\psi : \overline{t}' \to \Spec(B)$ lifting $\overline{t}' \to T$
as in the construction of the specialization map.
Let $s$ and $s'$ denote the images of $t$ and $t'$ in $S$.
Let $A$ be the strict henselization of $\mathcal{O}_{S, s}$
with respect to
$\kappa(s) \subset \kappa(s)^{sep} \subset \kappa(\overline{s})$.
Since $\kappa(\overline{s}) = \kappa(\overline{t})$,
by the functoriality of strict henselization
(Algebra, Lemma \ref{algebra-lemma-strictly-henselian-functorial})
we obtain a ring map $A \to B$ fitting into the commutative diagram
$$
\xymatrix{
\overline{t}' \ar[r]_-\psi \ar[d] & \Spec(B) \ar[d] \ar[r] & T \ar[d] \\
\overline{s}' \ar[r]^-\varphi & \Spec(A) \ar[r] & S
}
$$
Here the morphism $\varphi : \overline{s}' \to \Spec(A)$ is simply taken
to be the composition $\overline{t}' \to \Spec(B) \to \Spec(A)$.
Applying base change we obtain a commutative diagram
$$
\xymatrix{
Y_{\overline{t}'} \ar[r] \ar[d] & Y_B \ar[d] \\
X_{\overline{s}'} \ar[r] & X_A
}
$$
and from the construction of the specialization map the commutativity
of this diagram implies the commutativity of the diagram of the lemma.
\end{proof}

\begin{lemma}
\label{lemma-specialization-map-composition}
Let $f : X \to S$ be a proper morphism with geometrically connected fibres.
Let $s'' \leadsto s' \leadsto s$ be specializations of points of $S$.
A composition of specialization maps
$\pi_1(X_{\overline{s}''}) \to \pi_1(X_{\overline{s}'}) \to
\pi_1(X_{\overline{s}})$ is a specialization map
$\pi_1(X_{\overline{s}''}) \to \pi_1(X_{\overline{s}})$.
\end{lemma}

\begin{proof}
Let $\mathcal{O}_{S, s} \to A$ be the strict henselization
constructed using $\kappa(s) \to \kappa(\overline{s})$.
Let $A \to \kappa(\overline{s}')$ be the map used to construct
the first specialization map. Let $\mathcal{O}_{S, s'} \to A'$
be the strict henselization constructed using
$\kappa(s') \subset \kappa(\overline{s}')$.
By functoriality of strict henselization, there is a map
$A \to A'$ such that the composition with $A' \to \kappa(\overline{s}')$
is the given map
(Algebra, Lemma \ref{algebra-lemma-map-into-henselian-colimit}).
Next, let $A' \to \kappa(\overline{s}'')$ be the map used to
construct the second specialization map. Then it is clear that
the composition of the first and second specialization maps
is the specialization map
$\pi_1(X_{\overline{s}''}) \to \pi_1(X_{\overline{s}})$
constructed using $A \to A' \to \kappa(\overline{s}'')$.
\end{proof}

\noindent
Let $X \to S$ be a proper morphism with geometrically connected fibres.
Let $R$ be a strictly henselian valuation ring with algebraically
closed fraction field and let $\Spec(R) \to S$
be a morphism. Let $\eta, s \in \Spec(R)$ be the generic and closed point.
Then we can consider the specialization map
$$
sp_R : \pi_1(X_\eta) \to \pi_1(X_s)
$$
for the base change $X_R/\Spec(R)$. Note that this makes sense as both
$\eta$ and $s$ have algebraically closed residue fields.

\begin{lemma}
\label{lemma-specialization-map-valuation-ring}
Let $f : X \to S$ be a proper morphism with geometrically connected fibres.
Let $s' \leadsto s$ be a specialization of points of $S$ and let
$sp : \pi_1(X_{\overline{s}'}) \to \pi_1(X_{\overline{s}})$
be a specialization map. Then there exists a strictly henselian
valuation ring $R$ over $S$ with algebraically closed fraction field
such that $sp$ is isomorphic to $sp_R$ defined above.
\end{lemma}

\begin{proof}
Let $\mathcal{O}_{S, s} \to A$ be the strict henselization
constructed using $\kappa(s) \to \kappa(\overline{s})$.
Let $A \to \kappa(\overline{s}')$ be the map used to construct $sp$.
Let $R \subset \kappa(\overline{s}')$ be a valuation ring with
fraction field $\kappa(\overline{s}')$ dominating the image of $A$.
See Algebra, Lemma \ref{algebra-lemma-dominate}.
Observe that $R$ is strictly henselian for example by
Lemma \ref{lemma-normal-local-domain-separablly-closed-fraction-field}
and Algebra, Lemma \ref{algebra-lemma-valuation-ring-normal}.
Then the lemma is clear.
\end{proof}

\noindent
Let $X \to S$ be a proper morphism with geometrically connected fibres.
Let $R$ be a strictly henselian discrete valuation ring and let
$\Spec(R) \to S$ be a morphism. Let $\eta, s \in \Spec(R)$ be the
generic and closed point. Then we can consider the specialization map
$$
sp_R : \pi_1(X_{\overline{\eta}}) \to \pi_1(X_s)
$$
for the base change $X_R/\Spec(R)$. Note that this makes sense as $s$
has algebraically closed residue field.

\begin{lemma}
\label{lemma-specialization-map-discrete-valuation-ring}
Let $f : X \to S$ be a proper morphism with geometrically connected fibres.
Let $s' \leadsto s$ be a specialization of points of $S$ and let
$sp : \pi_1(X_{\overline{s}'}) \to \pi_1(X_{\overline{s}})$
be a specialization map. If $S$ is Noetherian, then
there exists a strictly henselian
discrete valuation ring $R$ over $S$ such that $sp$ is isomorphic to $sp_R$
defined above.
\end{lemma}

\begin{proof}
Let $\mathcal{O}_{S, s} \to A$ be the strict henselization
constructed using $\kappa(s) \to \kappa(\overline{s})$.
Let $A \to \kappa(\overline{s}')$ be the map used to construct $sp$.
Let $R \subset \kappa(\overline{s}')$ be a discrete valuation ring
dominating the image of $A$, see Algebra, Lemma \ref{algebra-lemma-exists-dvr}.
Choose a diagram of fields
$$
\xymatrix{
\kappa(\overline{s}) \ar[r] & k \\
A/\mathfrak m_A \ar[r] \ar[u] & R/\mathfrak m_R \ar[u]
}
$$
with $k$ algebraically closed. Let $R^{sh}$ be the strict
henselization of $R$ constructed using $R \to k$. We obtain
a map $A \to R^{sh}$ from Algebra, Lemma
\ref{algebra-lemma-strictly-henselian-functorial}.
The ring $R^{sh}$ is a discrete valuation ring by
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-dvr}.
Denote $\eta, o$ the generic and closed point of $\Spec(R^{sh})$.
Since the diagram of schemes
$$
\xymatrix{
\overline{\eta} \ar[d] \ar[r] & \Spec(R^{sh}) \ar[d] &
\Spec(k) \ar[d] \ar[l] \\
\overline{s}' \ar[r] & \Spec(A) & \overline{s} \ar[l]
}
$$
commutes, we obtain a commutative diagram
$$
\xymatrix{
\pi_1(X_{\overline{\eta}}) \ar[d] \ar[r]_{sp_{R^{sh}}} & \pi_1(X_o) \ar[d] \\
\pi_1(X_{\overline{s}'}) \ar[r]^{sp} & X_{\overline{s}}
}
$$
of specialization maps by the construction of these maps.
Since the vertical arrows are isomorphisms
(Lemma \ref{lemma-finite-etale-invariant-over-proper}), this proves the lemma.
\end{proof}








\section{Restriction to a closed subscheme}
\label{section-lefschetz}

\noindent
In this section we prove some results about the restriction functor
$$
\textit{F\'Et}_X \longrightarrow \textit{F\'Et}_Y,\quad
U \longmapsto V = U \times_X Y
$$
where $X$ is a scheme and $Y$ is a closed subscheme. Using the
topological invariance of the fundamental group, we can relate
the study of this functor to the completion functor on
finite locally free modules.

\medskip\noindent
In the following lemmas we use the concept of coherent formal modules
defined in
Cohomology of Schemes, Section \ref{coherent-section-coherent-formal}.
Given a Noetherian scheme and a quasi-coherent sheaf of ideals
$\mathcal{I} \subset \mathcal{O}_X$ we will say
an object $(\mathcal{F}_n)$ of $\textit{Coh}(X, \mathcal{I})$
is {\it finite locally free} if each $\mathcal{F}_n$ is a finite
locally free $\mathcal{O}_X/\mathcal{I}^n$-module.

\begin{lemma}
\label{lemma-restriction-fully-faithful}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme
with ideal sheaf $\mathcal{I} \subset \mathcal{O}_X$.
Assume the completion functor
$$
\textit{Coh}(\mathcal{O}_X)
\longrightarrow 
\textit{Coh}(X, \mathcal{I}),\quad
\mathcal{F} \longmapsto \mathcal{F}^\wedge
$$
is fully faithful on the full subcategory of finite locally free objects
(see above).
Then the restriction functor $\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is fully faithful.
\end{lemma}

\begin{proof}
Since the category of finite \'etale coverings has an
internal hom (Lemma \ref{lemma-internal-hom-finite-etale})
it suffices to prove the following: Given $U$ finite \'etale over $X$
and a morphism $t : Y \to U$ over $X$ there exists a unique section
$s : X \to U$ such that $t = s|_Y$. Picture
$$
\xymatrix{
& U \ar[d]^f \\
Y \ar[r] \ar[ru] & X \ar@{..>}@/^1em/[u]
}
$$
Finding the dotted arrow $s$ is the same thing as finding an
$\mathcal{O}_X$-algebra map
$$
s^\sharp : f_*\mathcal{O}_U \longrightarrow \mathcal{O}_X
$$
which reduces modulo the ideal sheaf of $Y$ to the given algebra map
$t^\sharp : f_*\mathcal{O}_U \to \mathcal{O}_Y$.
By Lemma \ref{lemma-thickening} we can lift $t$ uniquely to a compatible
system of maps $t_n : Y_n \to U$ and hence a map
$$
\lim t_n^\sharp : f_*\mathcal{O}_U \longrightarrow \lim \mathcal{O}_{Y_n}
$$
of sheaves of algebras on $X$.
Since $f_*\mathcal{O}_U$ is a finite locally free $\mathcal{O}_X$-module,
we conclude that we get a unique $\mathcal{O}_X$-module map
$\sigma : f_*\mathcal{O}_U \to \mathcal{O}_X$ whose completion
is $\lim t_n^\sharp$. To see that $\sigma$ is an algebra homomorphism,
we need to check that the diagram
$$
\xymatrix{
f_*\mathcal{O}_U \otimes_{\mathcal{O}_X} f_*\mathcal{O}_U
\ar[r] \ar[d]_{\sigma \otimes \sigma} &
f_*\mathcal{O}_U \ar[d]^\sigma \\
\mathcal{O}_X \otimes_{\mathcal{O}_X} \mathcal{O}_X \ar[r] &
\mathcal{O}_X
}
$$
commutes. For every $n$ we know this diagram commutes after restricting
to $Y_n$, i.e., the diagram commutes after applying the completion functor.
Hence by faithfulness of the completion functor we conclude.
\end{proof}

\begin{lemma}
\label{lemma-restriction-equivalence}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme
with ideal sheaf $\mathcal{I} \subset \mathcal{O}_X$.
Assume the completion functor
$$
\textit{Coh}(\mathcal{O}_X)
\longrightarrow 
\textit{Coh}(X, \mathcal{I}),\quad
\mathcal{F} \longmapsto \mathcal{F}^\wedge
$$
is an equivalence on full subcategories of finite locally free objects
(see above).
Then the restriction functor $\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is an equivalence.
\end{lemma}

\begin{proof}
The restriction functor is fully faithful by
Lemma \ref{lemma-restriction-fully-faithful}.

\medskip\noindent
Let $U_1 \to Y$ be a finite \'etale morphism. To finish the proof
we will show that $U_1$ is in the essential image of the
restriction functor.

\medskip\noindent
For $n \geq 1$ let $Y_n$ be the $n$th infinitesimal neighbourhood of $Y$.
By Lemma \ref{lemma-thickening}
there is a unique finite \'etale morphism
$\pi_n : U_n \to Y_n$ whose base change to $Y = Y_1$
recovers $U_1 \to Y_1$.
Consider the sheaves $\mathcal{F}_n = \pi_{n, *}\mathcal{O}_{U_n}$.
We may and do view $\mathcal{F}_n$ as an $\mathcal{O}_X$-module on $X$
which is locally isomorphic to
$(\mathcal{O}_X/f^{n + 1}\mathcal{O}_X)^{\oplus r}$.
This $(\mathcal{F}_n)$ is a finite locally free object of
$\textit{Coh}(X, \mathcal{I})$.
By assumption there exists a finite locally free $\mathcal{O}_X$-module
$\mathcal{F}$ and a compatible system of isomorphisms
$$
\mathcal{F}/\mathcal{I}^n\mathcal{F} \to \mathcal{F}_n
$$
of $\mathcal{O}_X$-modules.

\medskip\noindent
To construct an algebra structure on $\mathcal{F}$ consider the multiplication
maps
$\mathcal{F}_n \otimes_{\mathcal{O}_X} \mathcal{F}_n \to \mathcal{F}_n$
coming from the fact that $\mathcal{F}_n = \pi_{n, *}\mathcal{O}_{U_n}$
are sheaves of algebras. These define a map
$$
(\mathcal{F}\otimes_{\mathcal{O}_X} \mathcal{F})^\wedge
\longrightarrow
\mathcal{F}^\wedge
$$
in the category $\textit{Coh}(X, \mathcal{I})$. Hence by assumption
we may assume there is a map
$\mu : \mathcal{F}\otimes_{\mathcal{O}_X} \mathcal{F} \to \mathcal{F}$
whose restriction to $Y_n$ gives the multiplication maps above.
By faithfulness of the functor in the statement of the lemma,
we conclude that $\mu$ defines a commutative $\mathcal{O}_X$-algebra
structure on $\mathcal{F}$ compatible with the given algebra
structures on $\mathcal{F}_n$.
Setting
$$
U = \underline{\Spec}_X((\mathcal{F}, \mu))
$$
we obtain a finite locally free scheme $\pi : U \to X$ whose restriction
to $Y$ is isomorphic to $U_1$. The discriminant of $\pi$ is the zero
set of the section
$$
\det(Q_\pi) :
\mathcal{O}_X
\longrightarrow
\wedge^{top}(\pi_*\mathcal{O}_U)^{\otimes -2}
$$
constructed in
Discriminants, Section \ref{discriminant-section-discriminant}.
Since the restriction of this to $Y_n$ is an isomorphism for all $n$
by Discriminants, Lemma \ref{discriminant-lemma-discriminant}
we conclude that it is an isomorphism. Thus $\pi$ is \'etale by
Discriminants, Lemma \ref{discriminant-lemma-discriminant}.
\end{proof}

\begin{lemma}
\label{lemma-restriction-fully-faithful-general}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme
with ideal sheaf $\mathcal{I} \subset \mathcal{O}_X$.
Let $\mathcal{V}$ be the set of open subschemes $V \subset X$ containing $Y$
ordered by reverse inclusion. Assume the completion functor
$$
\colim_\mathcal{V} \textit{Coh}(\mathcal{O}_V)
\longrightarrow
\textit{Coh}(X, \mathcal{I}),
\quad
\mathcal{F} \longmapsto \mathcal{F}^\wedge
$$
defines is fully faithful on the full subcategory of
finite locally free objects (see above).
Then the restriction functor
$\colim_\mathcal{V} \textit{F\'Et}_V \to \textit{F\'Et}_Y$
is fully faithful.
\end{lemma}

\begin{proof}
Observe that $\mathcal{V}$ is a directed set, so the colimits are
as in Categories, Section \ref{categories-section-directed-colimits}.
The rest of the argument is almost exactly the same as the argument
in the proof of Lemma \ref{lemma-restriction-fully-faithful}; we urge
the reader to skip it.

\medskip\noindent
Since the category of finite \'etale coverings has an
internal hom (Lemma \ref{lemma-internal-hom-finite-etale})
it suffices to prove the following: Given $U$ finite \'etale over
$V \in \mathcal{V}$
and a morphism $t : Y \to U$ over $V$ there exists a $V' \geq V$
and a morphism $s : V' \to U$ over $V$ such that $t = s|_Y$. Picture
$$
\xymatrix{
& & U \ar[d]^f \\
Y \ar[r] \ar[rru] & V' \ar@{..>}[ru] \ar[r] & V
}
$$
Finding the dotted arrow $s$ is the same thing as finding an
$\mathcal{O}_{V'}$-algebra map
$$
s^\sharp : f_*\mathcal{O}_U|_{V'} \longrightarrow \mathcal{O}_{V'}
$$
which reduces modulo the ideal sheaf of $Y$ to the given algebra map
$t^\sharp : f_*\mathcal{O}_U \to \mathcal{O}_Y$.
By Lemma \ref{lemma-thickening} we can lift $t$ uniquely to a compatible
system of maps $t_n : Y_n \to U$ and hence a map
$$
\lim t_n^\sharp : f_*\mathcal{O}_U \longrightarrow \lim \mathcal{O}_{Y_n}
$$
of sheaves of algebras on $V$.
Observe that $f_*\mathcal{O}_U$ is a finite locally free
$\mathcal{O}_V$-module. Hence we get a $V' \geq V$ a map
$\sigma : f_*\mathcal{O}_U|_{V'} \to \mathcal{O}_{V'}$
whose completion is $\lim t_n^\sharp$.
To see that $\sigma$ is an algebra homomorphism, we need to check
that the diagram
$$
\xymatrix{
(f_*\mathcal{O}_U \otimes_{\mathcal{O}_V} f_*\mathcal{O}_U)|_{V'}
\ar[r] \ar[d]_{\sigma \otimes \sigma} &
f_*\mathcal{O}_U|_{V'} \ar[d]^\sigma \\
\mathcal{O}_{V'} \otimes_{\mathcal{O}_{V'}} \mathcal{O}_{V'} \ar[r] &
\mathcal{O}_{V'}
}
$$
commutes. For every $n$ we know this diagram commutes after restricting
to $Y_n$, i.e., the diagram commutes after applying the completion functor.
Hence by faithfulness of the completion functor
we deduce that there exists a $V'' \geq V'$ such that
$\sigma|_{V''}$ is an algebra homomorphism as desired.
\end{proof}

\begin{lemma}
\label{lemma-restriction-equivalence-general}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme
with ideal sheaf $\mathcal{I} \subset \mathcal{O}_X$.
Let $\mathcal{V}$ be the set of open subschemes $V \subset X$ containing $Y$
ordered by reverse inclusion. Assume the completion functor
$$
\colim_\mathcal{V} \textit{Coh}(\mathcal{O}_V)
\longrightarrow
\textit{Coh}(X, \mathcal{I}),
\quad
\mathcal{F} \longmapsto \mathcal{F}^\wedge
$$
defines an equivalence of the full subcategories of
finite locally free objects (see explanation above).
Then the restriction functor
$$
\colim_\mathcal{V} \textit{F\'Et}_V \to \textit{F\'Et}_Y
$$
is an equivalence.
\end{lemma}

\begin{proof}
Observe that $\mathcal{V}$ is a directed set, so the colimits are
as in Categories, Section \ref{categories-section-directed-colimits}.
The rest of the argument is almost exactly the same as the argument
in the proof of Lemma \ref{lemma-restriction-equivalence}; we urge
the reader to skip it.

\medskip\noindent
The restriction functor is fully faithful by
Lemma \ref{lemma-restriction-fully-faithful-general}.

\medskip\noindent
Let $U_1 \to Y$ be a finite \'etale morphism. To finish the proof
we will show that $U_1$ is in the essential image of the
restriction functor.

\medskip\noindent
For $n \geq 1$ let $Y_n$ be the $n$th infinitesimal neighbourhood of $Y$.
By Lemma \ref{lemma-thickening}
there is a unique finite \'etale morphism
$\pi_n : U_n \to Y_n$ whose base change to $Y = Y_1$
recovers $U_1 \to Y_1$.
Consider the sheaves $\mathcal{F}_n = \pi_{n, *}\mathcal{O}_{U_n}$.
We may and do view $\mathcal{F}_n$ as an $\mathcal{O}_X$-module on $X$
which is locally isomorphic to
$(\mathcal{O}_X/f^{n + 1}\mathcal{O}_X)^{\oplus r}$.
This $(\mathcal{F}_n)$ is a finite locally free object of
$\textit{Coh}(X, \mathcal{I})$.
By assumption there exists a $V \in \mathcal{V}$
and a finite locally free $\mathcal{O}_V$-module $\mathcal{F}$
and a compatible system of isomorphisms
$$
\mathcal{F}/\mathcal{I}^n\mathcal{F} \to \mathcal{F}_n
$$
of $\mathcal{O}_V$-modules.

\medskip\noindent
To construct an algebra structure on $\mathcal{F}$ consider the multiplication
maps
$\mathcal{F}_n \otimes_{\mathcal{O}_V} \mathcal{F}_n \to \mathcal{F}_n$
coming from the fact that $\mathcal{F}_n = \pi_{n, *}\mathcal{O}_{U_n}$
are sheaves of algebras. These define a map
$$
(\mathcal{F}\otimes_{\mathcal{O}_V} \mathcal{F})^\wedge
\longrightarrow
\mathcal{F}^\wedge
$$
in the category $\textit{Coh}(X, \mathcal{I})$. Hence by assumption
after shrinking $V$ we may assume there is a map
$\mu : \mathcal{F}\otimes_{\mathcal{O}_V} \mathcal{F} \to \mathcal{F}$
whose restriction to $Y_n$ gives the multiplication maps above.
After possibly shrinking further we may assume $\mu$
defines a commutative $\mathcal{O}_V$-algebra
structure on $\mathcal{F}$ compatible with the given algebra
structures on $\mathcal{F}_n$.
Setting
$$
U = \underline{\Spec}_V((\mathcal{F}, \mu))
$$
we obtain a finite locally free scheme over $V$ whose restriction
to $Y$ is isomorphic to $U_1$. It follows that $U \to V$
is \'etale at all points lying over $Y$, see
More on Morphisms, Lemma
\ref{more-morphisms-lemma-check-smoothness-on-infinitesimal-nbhds}.
Thus after shrinking $V$ once more we may assume $U \to V$ is
finite \'etale. This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-restriction-faithful}
Let $X$ be a scheme and let $Y \subset X$ be a closed subscheme.
If every connected component of $X$ meets $Y$, then
the restriction functor $\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is faithful.
\end{lemma}

\begin{proof}
Let $a, b : U \to U'$ be two morphisms of schemes finite \'etale over $X$
whose restriction to $Y$ are the same. The image of a connected component
of $U$ is an connected component of $X$; this follows from
Topology, Lemma \ref{topology-lemma-finite-fibre-connected-components}
applied to the restriction of $U \to X$ to a connected component of $X$.
Hence the image of every connected component of $U$ meets $Y$
by assumption. We conclude that $a = b$ after restriction to each
connected component of $U$ by \'Etale Morphisms, Proposition
\ref{etale-proposition-equality}. Since the equalizer of $a$ and $b$
is an open subscheme of $U$ (as the diagonal of $U'$ over $X$ is open)
we conclude.
\end{proof}

\begin{lemma}
\label{lemma-restriction-fully-faithful-special}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme.
Let $Y_n \subset X$ be the $n$th infinitesimal neighbourhood of $Y$ in $X$.
Assume one of the following holds
\begin{enumerate}
\item $X$ is quasi-affine and
$\Gamma(X, \mathcal{O}_X) \to \lim \Gamma(Y_n, \mathcal{O}_{Y_n})$
is an isomorphism, or
\item $X$ has an ample invertible module $\mathcal{L}$ and
$\Gamma(X, \mathcal{L}^{\otimes m}) \to
\lim \Gamma(Y_n, \mathcal{L}^{\otimes m}|_{Y_n})$
is an isomorphism for all $m \gg 0$, or
\item for every finite locally free $\mathcal{O}_X$-module
$\mathcal{E}$ the map
$\Gamma(X, \mathcal{E}) \to \lim \Gamma(Y_n, \mathcal{E}|_{Y_n})$
is an isomorphism.
\end{enumerate}
Then the restriction functor $\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is fully faithful.
\end{lemma}

\begin{proof}
This lemma follows formally from
Lemma \ref{lemma-restriction-fully-faithful} and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-completion-fully-faithful}.
\end{proof}

\begin{lemma}
\label{lemma-restriction-fully-faithful-general-special}
Let $X$ be a Noetherian scheme and let $Y \subset X$ be a closed subscheme.
Let $Y_n \subset X$ be the $n$th infinitesimal neighbourhood of $Y$ in $X$.
Let $\mathcal{V}$ be the set of open subschemes $V \subset X$ containing $Y$
ordered by reverse inclusion. Assume one of the following holds
\begin{enumerate}
\item $X$ is quasi-affine and
$$
\colim_\mathcal{V} \Gamma(V, \mathcal{O}_V)
\longrightarrow
\lim \Gamma(Y_n, \mathcal{O}_{Y_n})
$$
is an isomorphism, or
\item $X$ has an ample invertible module $\mathcal{L}$ and
$$
\colim_\mathcal{V} \Gamma(V, \mathcal{L}^{\otimes m})
\longrightarrow
\lim \Gamma(Y_n, \mathcal{L}^{\otimes m}|_{Y_n})
$$
is an isomorphism for all $m \gg 0$, or
\item for every $V \in \mathcal{V}$ and every finite locally free
$\mathcal{O}_V$-module $\mathcal{E}$ the map
$$
\colim_{V' \geq V} \Gamma(V', \mathcal{E}|_{V'})
\longrightarrow
\lim \Gamma(Y_n, \mathcal{E}|_{Y_n})
$$
is an isomorphism.
\end{enumerate}
Then the functor
$$
\colim_\mathcal{V} \textit{F\'Et}_V \to \textit{F\'Et}_Y
$$
is fully faithful.
\end{lemma}

\begin{proof}
This lemma follows formally from
Lemma \ref{lemma-restriction-fully-faithful-general} and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-completion-fully-faithful-general}.
\end{proof}






\section{Pushouts and fundamental groups}
\label{section-pushouts}

\noindent
Here is the main result.

\begin{lemma}
\label{lemma-pushout-along-closed-immersion-and-integral}
In More on Morphisms, Situation
\ref{more-morphisms-situation-pushout-along-closed-immersion-and-integral},
for example if $Z \to Y$ and $Z \to X$ are closed immersions of schemes,
there is an equivalence of categories
$$
\textit{F\'Et}_{Y \amalg_Z X}
\longrightarrow
\textit{F\'Et}_Y
\times_{\textit{F\'Et}_Z}
\textit{F\'Et}_X
$$
\end{lemma}

\begin{proof}
The pushout exists by
More on Morphisms, Proposition
\ref{more-morphisms-proposition-pushout-along-closed-immersion-and-integral}.
The functor is given by sending a scheme $U$ finite \'etale over the
pushout to the base changes $Y' = U \times_{Y \amalg_Z X} Y$
and $X' = U \times_{Y \amalg_Z X} X$ and the natural isomorphism
$Y' \times_Y Z \to X' \times_X Z$ over $Z$. To prove this functor
is an equivalence we use
More on Morphisms, Lemma
\ref{more-morphisms-lemma-pushout-functor-equivalence-flat}
to construct a quasi-inverse functor.
The only thing left to prove is to show that given a morphism
$U \to Y \amalg_Z X$ which is separated, quasi-finite and \'etale
such that $X' \to X$ and $Y' \to Y$ are finite,
then $U \to Y \amalg_Z X$ is finite.
This can either be deduced from the corresponding algebra fact
(More on Algebra, Lemma
\ref{more-algebra-lemma-finite-module-over-fibre-product})
or it can be seen because
$$
X' \amalg Y' \to U
$$
is surjective and $X'$ and $Y'$ are proper over $Y \amalg_Z X$
(this uses the description of the pushout in More on Morphisms, Proposition
\ref{more-morphisms-proposition-pushout-along-closed-immersion-and-integral})
and then we can apply
Morphisms, Lemma \ref{morphisms-lemma-scheme-theoretic-image-is-proper}
to conclude that $U$ is proper over $Y \amalg_Z X$.
Since a quasi-finite and proper morphism is finite
(More on Morphisms, Lemma \ref{more-morphisms-lemma-characterize-finite})
we win.
\end{proof}





\section{Finite \'etale covers of punctured spectra, I}
\label{section-pi1-punctured-spec}

\noindent
We first prove some results \'a la Lefschetz.

\begin{situation}
\label{situation-local-lefschetz}
Let $(A, \mathfrak m)$ be a Noetherian local ring and $f \in \mathfrak m$.
We set $X = \Spec(A)$ and $X_0 = \Spec(A/fA)$ and we
let $U = X \setminus \{\mathfrak m\}$ and
$U_0 = X_0 \setminus \{\mathfrak m\}$ be the punctured spectrum of
$A$ and $A/fA$.
\end{situation}

\noindent
Recall that for a scheme $X$ the category of schemes finite
\'etale over $X$ is denoted $\textit{F\'Et}_X$, see
Section \ref{section-finite-etale}.
In Situation \ref{situation-local-lefschetz}
we will study the base change functors
$$
\xymatrix{
\textit{F\'Et}_X \ar[d] \ar[r] & \textit{F\'Et}_U \ar[d] \\
\textit{F\'Et}_{X_0} \ar[r] & \textit{F\'Et}_{U_0}
}
$$
In many case the right vertical arrow is faithful.

\begin{lemma}
\label{lemma-faithful}
In Situation \ref{situation-local-lefschetz}.
Assume one of the following holds
\begin{enumerate}
\item $\dim(A/\mathfrak p) \geq 2$ for every minimal prime
$\mathfrak p \subset A$ with $f \not \in \mathfrak p$, or
\item every connected component of $U$ meets $U_0$.
\end{enumerate}
Then
$$
\textit{F\'Et}_U \longrightarrow \textit{F\'Et}_{U_0},\quad
V \longmapsto V_0 = V \times_U U_0
$$
is a faithful functor.
\end{lemma}

\begin{proof}
Case (2) is immediate from Lemma \ref{lemma-restriction-faithful}.
Assumption (1) implies every irreducible component of $U$ meets $U_0$, see
Algebra, Lemma \ref{algebra-lemma-one-equation}.
Hence (1) follows from (2).
\end{proof}

\noindent
Before we prove something more interesting, we need a couple of lemmas.

\begin{lemma}
\label{lemma-fill-in-missing}
In Situation \ref{situation-local-lefschetz}. Let $V \to U$ be a finite
morphism.  Let $A^\wedge$ be the $\mathfrak m$-adic completion of $A$,
let $X' = \Spec(A^\wedge)$ and let $U'$ and $V'$ be the base changes of
$U$ and $V$ to $X'$. If $Y' \to X'$ is a finite morphism such that
$V' = Y' \times_{X'} U'$, then there exists a finite morphism $Y \to X$
such that $V = Y \times_X U$ and $Y' = Y \times_X X'$.
\end{lemma}

\begin{proof}
This is a straightforward application of
More on Algebra, Proposition \ref{more-algebra-proposition-equivalence}.
Namely, choose generators $f_1, \ldots, f_t$ of $\mathfrak m$.
For each $i$ write $V \times_U D(f_i) = \Spec(B_i)$.
For $1 \leq i, j \leq n$ we obtain an isomorphism
$\alpha_{ij} : (B_i)_{f_j} \to (B_j)_{f_i}$ of $A_{f_if_j}$-algebras
because the spectrum of both represent $V \times_U D(f_if_j)$.
Write $Y' = \Spec(B')$. Since $V \times_U U' = Y \times_{X'} U'$
we get isomorphisms $\alpha_i : B'_{f_i} \to B_i \otimes_A A^\wedge$.
A straightforward argument shows that $(B', B_i, \alpha_i, \alpha_{ij})$
is an object of $\text{Glue}(A \to A^\wedge, f_1, \ldots, f_t)$, see
More on Algebra, Remark \ref{more-algebra-remark-glueing-data}.
Applying the proposition cited above (and using
More on Algebra, Remark \ref{more-algebra-remark-formal-glueing-algebras}
to obtain the algebra structure) we find an $A$-algebra $B$ such that
$\text{Can}(B)$ is isomorphic to $(B', B_i, \alpha_i, \alpha_{ij})$.
Setting $Y = \Spec(B)$ we see that $Y \to X$ is a morphism
which comes equipped with compatible isomorphisms
$V \cong Y \times_X U$ and $Y' = Y \times_X X'$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-fully-faithful-henselian-completion}
In Situation \ref{situation-local-lefschetz} assume $A$ is henselian
or more generally that $(A, (f))$ is a henselian pair.
Let $A^\wedge$ be the $\mathfrak m$-adic completion of $A$,
let $X' = \Spec(A^\wedge)$ and let $U'$ and $U'_0$ be the base changes of
$U$ and $U_0$ to $X'$. If $\textit{F\'Et}_{U'} \to \textit{F\'Et}_{U'_0}$
is fully faithful, then $\textit{F\'Et}_U \to \textit{F\'Et}_{U_0}$
is fully faithful.
\end{lemma}

\begin{proof}
Assume $\textit{F\'Et}_{U'} \longrightarrow \textit{F\'Et}_{U'_0}$
is a fully faithful. Since $X' \to X$ is faithfully flat, it is
immediate that the functor $V \to V_0 = V \times_U U_0$ is faithful.
Since the category of finite \'etale coverings has an internal hom
(Lemma \ref{lemma-internal-hom-finite-etale})
it suffices to prove the following: Given $V$ finite \'etale over $U$
we have
$$
\Mor_U(U, V) = \Mor_{U_0}(U_0, V_0)
$$
The we assume we have a morphism $s_0 : U_0 \to V_0$ over $U_0$ and we will
produce a morphism $s : U \to V$ over $U$.

\medskip\noindent
By our assumption there does exist a morphism $s' : U' \to V'$
whose restriction to $V'_0$ is the base change $s'_0$ of $s_0$.
Since $V' \to U'$ is finite \'etale this means that $V' = s'(U') \amalg W'$
for some $W' \to U'$ finite and \'etale.
Choose a finite morphism $Z' \to X'$ such that $W' = Z' \times_{X'} U'$.
This is possible by Zariski's main theorem in the form stated in
More on Morphisms, Lemma
\ref{more-morphisms-lemma-quasi-finite-separated-pass-through-finite}
(small detail omitted).
Then
$$
V' = s'(U') \amalg W' \longrightarrow X' \amalg Z' = Y'
$$
is an open immersion such that $V' = Y' \times_{X'} U'$.
By Lemma \ref{lemma-fill-in-missing} we can find $Y \to X$ finite
such that $V = Y \times_X U$ and $Y' = Y \times_X X'$.
Write $Y = \Spec(B)$ so that $Y' = \Spec(B \otimes_A A^\wedge)$.
Then $B \otimes_A A^\wedge$ has an idempotent $e'$
corresponding to the open and closed subscheme $X'$ of $Y' = X' \amalg Z'$.

\medskip\noindent
The case $A$ is henselian (slightly easier). The image $\overline{e}$
of $e'$ in $B \otimes_A \kappa(\mathfrak m) = B/\mathfrak mB$ lifts to an
idempotent $e$ of $B$ as $A$ is henselian (because $B$ is a product of
local rings by Algebra, Lemma \ref{algebra-lemma-characterize-henselian}).
Then we see that $e$ maps to $e'$ by uniqueness of lifts of idempotents
(using that $B \otimes_A A^\wedge$ is a product of local rings).
Let $Y_1 \subset Y$ be the open and closed subscheme corresponding to $e$.
Then $Y_1 \times_X X' = s'(X')$ which implies that $Y_1 \to X$ is
an isomorphism (by faithfully flat descent) and gives the desired section.

\medskip\noindent
The case where $(A, (f))$ is a henselian pair. Here we use that $s'$ is
a lift of $s'_0$. Namely, let $Y_{0, 1} \subset Y_0 = Y \times_X X_0$
be the closure of $s_0(U_0) \subset V_0 = Y_0 \times_{X_0} U_0$.
As $X' \to X$ is flat, the base change $Y'_{0, 1} \subset Y'_0$
is the closure of $s'_0(U'_0)$ which is equal to $X'_0 \subset Y'_0$
(see Morphisms, Lemma
\ref{morphisms-lemma-flat-base-change-scheme-theoretic-image}).
Since $Y'_0 \to Y_0$ is submersive
(Morphisms, Lemma \ref{morphisms-lemma-fpqc-quotient-topology})
we conclude that $Y_{0, 1}$ is open and closed in $Y_0$.
Let $e_0 \in B/fB$ be the corresponding idempotent.
By More on Algebra, Lemma
\ref{more-algebra-lemma-characterize-henselian-pair}
we can lift $e_0$ to an idempotent $e \in B$.
Then we conclude as before.
\end{proof}

\noindent
In Situation \ref{situation-local-lefschetz}
fully faithfulness of the restriction functor
$\textit{F\'Et}_U \longrightarrow \textit{F\'Et}_{U_0}$
holds under fairly mild assumptions.
In particular, the assumptions often do not imply
$U$ is a connected scheme, but the conclusion guarantees
that $U$ and $U_0$ have the same number of connected components.

\begin{lemma}
\label{lemma-fully-faithful-simple}
In Situation \ref{situation-local-lefschetz}. Assume
\begin{enumerate}
\item[(a)] $A$ has a dualizing complex,
\item[(b)] the pair $(A, (f))$ is henselian,
\item[(c)] one of the following is true
\begin{enumerate}
\item[(i)] $A_f$ is $(S_2)$ and every irreducible component of $X$
not contained in $X_0$ has dimension $\geq 3$, or
\item[(ii)] for every prime
$\mathfrak p \subset A$, $f \not \in \mathfrak p$ we have
$\text{depth}(A_\mathfrak p) + \dim(A/\mathfrak p) > 2$.
\end{enumerate}
\end{enumerate}
Then the restriction functor
$\textit{F\'Et}_U \longrightarrow \textit{F\'Et}_{U_0}$
is fully faithful.
\end{lemma}

\begin{proof}
Let $A'$ be the $\mathfrak m$-adic completion of $A$. We will show that
the hypotheses remain true for $A'$. This is clear for conditions
(a) and (b). Condition (c)(ii) is preserved by
Local Cohomology, Lemma \ref{local-cohomology-lemma-change-completion}.
Next, assume (c)(i) holds. Since $A$ is universally catenary
(Dualizing Complexes, Lemma \ref{dualizing-lemma-universally-catenary})
we see that every irreducible component of $\Spec(A')$ not contained in $V(f)$
has dimension $\geq 3$, see
More on Algebra, Proposition \ref{more-algebra-proposition-ratliff}.
Since $A \to A'$ is flat with Gorenstein fibres,
the condition that $A_f$ is $(S_2)$ implies that $A'_f$ is $(S_2)$.
References used:
Dualizing Complexes, Section \ref{dualizing-section-formal-fibres},
More on Algebra, Section \ref{more-algebra-section-properties-formal-fibres},
and Algebra, Lemma \ref{algebra-lemma-Sk-goes-up}.
Thus by Lemma \ref{lemma-fully-faithful-henselian-completion}
we may assume that $A$ is a Noetherian complete local ring.

\medskip\noindent
Assume $A$ is a complete local ring in addition to the other assumptions.
By Lemma \ref{lemma-restriction-fully-faithful} the result follows from
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-fully-faithful-simple-two}.
\end{proof}

\begin{lemma}
\label{lemma-fully-faithful-minimal}
\begin{reference}
\cite[Corollary 1.11]{Bhatt-local}
\end{reference}
In Situation \ref{situation-local-lefschetz}. Assume
\begin{enumerate}
\item $H^1_\mathfrak m(A)$ and $H^2_\mathfrak m(A)$ are
annihilated by a power of $f$, and
\item $A$ is henselian or more generally $(A, (f))$ is a henselian pair.
\end{enumerate}
Then the restriction functor
$\textit{F\'Et}_U \longrightarrow \textit{F\'Et}_{U_0}$
is fully faithful.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-fully-faithful-henselian-completion}
we may assume that $A$ is a Noetherian complete local ring.
(The assumptions carry over; use
Dualizing Complexes, Lemma \ref{dualizing-lemma-torsion-change-rings}.)
By Lemma \ref{lemma-restriction-fully-faithful}
the result follows from
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-fully-faithful-alternative}.
\end{proof}

\begin{lemma}
\label{lemma-fully-faithful}
In Situation \ref{situation-local-lefschetz} assume $A$ has depth $\geq 3$
and $A$ is henselian or more generally $(A, (f))$ is a henselian pair. Then
the restriction functor
$\textit{F\'Et}_U \to \textit{F\'Et}_{U_0}$
is fully faithful.
\end{lemma}

\begin{proof}
The assumption of depth forces
$H^1_\mathfrak m(A) = H^2_\mathfrak m(A) = 0$, see
Dualizing Complexes, Lemma \ref{dualizing-lemma-depth}.
Hence Lemma \ref{lemma-fully-faithful-minimal} applies.
\end{proof}



























\section{Purity in local case, I}
\label{section-local-purity}

\noindent
Let $(A, \mathfrak m)$ be a Noetherian local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$ be the punctured spectrum.
We say {\it purity holds for $(A, \mathfrak m)$} if the restriction functor
$$
\textit{F\'Et}_X \longrightarrow \textit{F\'Et}_U
$$
is essentially surjective. In this section we try to understand how the
question changes when one passes from $X$ to a hypersurface $X_0$ in $X$,
in other words, we study a kind of local Lefschetz property for the
fundamental groups of punctured spectra.
These results will be useful to proceed by induction on dimension
in the proofs of our main results on local purity, namely,
Lemma \ref{lemma-local-purity},
Proposition \ref{proposition-purity-complete-intersection}, and
Proposition \ref{proposition-purity-smooth-over-depth2}.

\begin{lemma}
\label{lemma-sections-over-punctured-spec}
Let $(A, \mathfrak m)$ be a Noetherian local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$.
Let $\pi : Y \to X$ be a finite morphism such that
$\text{depth}(\mathcal{O}_{Y, y}) \geq 2$ for all closed points
$y \in Y$.
Then $Y$ is the spectrum of $B = \mathcal{O}_Y(\pi^{-1}(U))$.
\end{lemma}

\begin{proof}
Set $V = \pi^{-1}(U)$ and denote $\pi' : V \to U$ the restriction of $\pi$.
Consider the $\mathcal{O}_X$-module map
$$
\pi_*\mathcal{O}_Y \longrightarrow j_*\pi'_*\mathcal{O}_V
$$
where $j : U \to X$ is the inclusion morphism. We claim
Divisors, Lemma \ref{divisors-lemma-depth-2-hartog}
applies to this map. If so, then $B = \Gamma(Y, \mathcal{O}_Y)$
and we see that the lemma holds. Let $x \in X$ be the closed point.
It suffices to show that
$\text{depth}((\pi_*\mathcal{O}_Y)_x) \geq 2$.
Let $y_1, \ldots, y_n \in Y$ be the points mapping to $x$.
By Algebra, Lemma \ref{algebra-lemma-depth-goes-down-finite}
it suffices to show that
$\text{depth}(\mathcal{O}_{Y, y_i}) \geq 2$ for $i = 1, \ldots, n$.
Since this is the assumption of the lemma the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-reformulate-purity}
Let $(A, \mathfrak m)$ be a Noetherian local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$.
Let $V$ be finite \'etale
over $U$. Assume $A$ has depth $\geq 2$. The following are equivalent
\begin{enumerate}
\item $V = Y \times_X U$ for some $Y \to X$ finite \'etale,
\item $B = \Gamma(V, \mathcal{O}_V)$ is finite \'etale over $A$.
\end{enumerate}
\end{lemma}

\begin{proof}
Denote $\pi : V \to U$ the given finite \'etale morphism.
Assume $Y$ as in (1) exists. Let $x \in X$ be the point
corresponding to $\mathfrak m$.
Let $y \in Y$ be a point mapping to $x$. We claim that
$\text{depth}(\mathcal{O}_{Y, y}) \geq 2$.
This is true because $Y \to X$ is \'etale and hence
$A = \mathcal{O}_{X, x}$ and $\mathcal{O}_{Y, y}$ have
the same depth (Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}).
Hence Lemma \ref{lemma-sections-over-punctured-spec}
applies and $Y = \Spec(B)$.

\medskip\noindent
The implication (2) $\Rightarrow$ (1) is easier and the
details are omitted.
\end{proof}

\begin{lemma}
\label{lemma-reformulate-purity-normal}
Let $(A, \mathfrak m)$ be a Noetherian local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$. Assume $A$ is normal
of dimension $\geq 2$. The functor
$$
\textit{F\'Et}_U \longrightarrow
\left\{
\begin{matrix}
\text{finite normal }A\text{-algebras }B\text{ such} \\
\text{that }\Spec(B) \to X\text{ is \'etale over }U
\end{matrix}
\right\},
\quad
V \longmapsto \Gamma(V, \mathcal{O}_V)
$$
is an equivalence. Moreover, $V = Y \times_X U$ for some $Y \to X$
finite \'etale if and only if $B = \Gamma(V, \mathcal{O}_V)$
is finite \'etale over $A$.
\end{lemma}

\begin{proof}
Observe that $\text{depth}(A) \geq 2$ because $A$ is normal
(Serre's criterion for normality, Algebra, Lemma
\ref{algebra-lemma-criterion-normal}).
Thus the final statement follows from Lemma \ref{lemma-reformulate-purity}.
Given $\pi : V \to U$ finite \'etale, set $B = \Gamma(V, \mathcal{O}_V)$.
If we can show that $B$ is normal and finite over $A$, then
we obtain the displayed functor. Since there is an obvious
quasi-inverse functor, this is also all that we have to show.

\medskip\noindent
Since $A$ is normal, the scheme $V$ is normal
(Descent, Lemma \ref{descent-lemma-normal-local-smooth}).
Hence $V$ is a finite disjoint union of integral schemes
(Properties, Lemma \ref{properties-lemma-normal-Noetherian}).
Thus we may assume $V$ is integral.
In this case the function field $L$ of $V$
(Morphisms, Section \ref{morphisms-section-rational-maps})
is a finite separable extension of the fraction field of $A$
(because we get it by looking at the generic fibre
of $V \to U$ and using Morphisms, Lemma
\ref{morphisms-lemma-etale-over-field}).
By Algebra, Lemma
\ref{algebra-lemma-Noetherian-normal-domain-finite-separable-extension}
the integral closure $B' \subset L$ of $A$ in $L$ is finite over $A$.
By More on Algebra, Lemma \ref{more-algebra-lemma-integral-closure-reflexive}
we see that $B'$ is a reflexive $A$-module, which in turn implies
that $\text{depth}_A(B') \geq 2$ by
More on Algebra, Lemma \ref{more-algebra-lemma-reflexive-over-normal}.

\medskip\noindent
Let $f \in \mathfrak m$. Then $B_f = \Gamma(V \times_U D(f), \mathcal{O}_V)$
(Properties, Lemma \ref{properties-lemma-invert-f-sections}).
Hence $B'_f = B_f$ because $B_f$ is normal (see above),
finite over $A_f$ with fraction field $L$.
It follows that $V = \Spec(B') \times_X U$.
Then we conclude that $B = B'$ from
Lemma \ref{lemma-sections-over-punctured-spec}
applied to $\Spec(B') \to X$.
This lemma applies because the localizations $B'_{\mathfrak m'}$
of $B'$ at maximal ideals $\mathfrak m' \subset B'$ lying over
$\mathfrak m$ have depth $\geq 2$ by
Algebra, Lemma \ref{algebra-lemma-depth-goes-down-finite}
and the remark on depth in the preceding paragraph.
\end{proof}

\begin{lemma}
\label{lemma-purity-and-completion}
Let $(A, \mathfrak m)$ be a Noetherian local ring. Set $X = \Spec(A)$
and let $U = X \setminus \{\mathfrak m\}$.
Let $V$ be finite \'etale over $U$.
Let $A^\wedge$ be the $\mathfrak m$-adic completion of $A$,
let $X' = \Spec(A^\wedge)$ and let $U'$ and $V'$ be the base changes of
$U$ and $V$ to $X'$. The following are equivalent
\begin{enumerate}
\item $V = Y \times_X U$ for some $Y \to X$ finite \'etale, and
\item $V' = Y' \times_{X'} U'$ for some $Y' \to X'$ finite \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
The implication (1) $\Rightarrow$ (2) follows from taking the base change
of a solution $Y \to X$. Let $Y' \to X'$ be as in (2).
By Lemma \ref{lemma-fill-in-missing} we can find $Y \to X$ finite
such that $V = Y \times_X U$ and $Y' = Y \times_X X'$.
By descent we see that $Y \to X$ is finite \'etale
(Algebra, Lemmas \ref{algebra-lemma-descend-properties-modules} and
\ref{algebra-lemma-etale}). This finishes the proof.
\end{proof}

\noindent
The point of the following two lemmas is that the assumptions do not force
$A$ to have depth $\geq 3$. For example if $A$ is a complete normal
local domain of dimension $\geq 3$ and $f \in \mathfrak m$ is nonzero,
then the assumptions are satisfied.

\begin{lemma}
\label{lemma-lift-simple}
In Situation \ref{situation-local-lefschetz}. Let $V$ be finite
\'etale over $U$. Assume
\begin{enumerate}
\item[(a)] $A$ has a dualizing complex,
\item[(b)] the pair $(A, (f))$ is henselian,
\item[(c)] one of the following is true
\begin{enumerate}
\item[(i)] $A_f$ is $(S_2)$ and every irreducible component of $X$
not contained in $X_0$ has dimension $\geq 3$, or
\item[(ii)] for every prime $\mathfrak p \subset A$, $f \not \in \mathfrak p$
we have $\text{depth}(A_\mathfrak p) + \dim(A/\mathfrak p) > 2$.
\end{enumerate}
\item[(d)] $V_0 = V \times_U U_0$ is equal to $Y_0 \times_{X_0} U_0$
for some $Y_0 \to X_0$ finite \'etale.
\end{enumerate}
Then $V = Y \times_X U$ for some $Y \to X$ finite \'etale.
\end{lemma}

\begin{proof}
We reduce to the complete case using Lemma \ref{lemma-purity-and-completion}.
(The assumptions carry over; see proof of
Lemma \ref{lemma-fully-faithful-simple}.)

\medskip\noindent
In the complete case we can lift $Y_0 \to X_0$ to a finite \'etale
morphism $Y \to X$ by
More on Algebra, Lemma \ref{more-algebra-lemma-finite-etale-equivalence};
observe that $(A, fA)$ is a henselian pair by
More on Algebra, Lemma \ref{more-algebra-lemma-complete-henselian}.
Then we can use Lemma \ref{lemma-fully-faithful-simple}
to see that $V$ is isomorphic to $Y \times_X U$ and
the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-lift-purity-general}
In Situation \ref{situation-local-lefschetz}.
Let $V$ be finite \'etale over $U$. Assume
\begin{enumerate}
\item $H^1_\mathfrak m(A)$ and $H^2_\mathfrak m(A)$
are annihilated by a power of $f$,
\item $V_0 = V \times_U U_0$ is equal to $Y_0 \times_{X_0} U_0$
for some $Y_0 \to X_0$ finite \'etale.
\end{enumerate}
Then $V = Y \times_X U$ for some $Y \to X$ finite \'etale.
\end{lemma}

\begin{proof}
We reduce to the complete case using Lemma \ref{lemma-purity-and-completion}.
(The assumptions carry over; use Dualizing Complexes, Lemma
\ref{dualizing-lemma-torsion-change-rings}.)

\medskip\noindent
In the complete case we can lift $Y_0 \to X_0$ to a finite \'etale
morphism $Y \to X$ by
More on Algebra, Lemma \ref{more-algebra-lemma-finite-etale-equivalence};
observe that $(A, fA)$ is a henselian pair by
More on Algebra, Lemma \ref{more-algebra-lemma-complete-henselian}.
Then we can use Lemma \ref{lemma-fully-faithful-minimal}
to see that $V$ is isomorphic to $Y \times_X U$ and
the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-lift-purity}
In Situation \ref{situation-local-lefschetz}.
Let $V$ be finite \'etale over $U$. Assume
\begin{enumerate}
\item $A$ has depth $\geq 3$,
\item $V_0 = V \times_U U_0$ is equal to $Y_0 \times_{X_0} U_0$
for some $Y_0 \to X_0$ finite \'etale.
\end{enumerate}
Then $V = Y \times_X U$ for some $Y \to X$ finite \'etale.
\end{lemma}

\begin{proof}
The assumption of depth forces
$H^1_\mathfrak m(A) = H^2_\mathfrak m(A) = 0$, see
Dualizing Complexes, Lemma \ref{dualizing-lemma-depth}.
Hence Lemma \ref{lemma-lift-purity-general} applies.
\end{proof}










\section{Purity of branch locus}
\label{section-purity}

\noindent
We will use the discriminant of a finite locally free morphism. See
Discriminants, Section \ref{discriminant-section-discriminant}.

\begin{lemma}
\label{lemma-find-point-codim-1}
Let $(A, \mathfrak m)$ be a Noetherian local ring with $\dim(A) \geq 1$.
Let $f \in \mathfrak m$. Then there exist a $\mathfrak p \in V(f)$ with
$\dim(A_\mathfrak p) = 1$.
\end{lemma}

\begin{proof}
By induction on $\dim(A)$. If $\dim(A) = 1$, then $\mathfrak p = \mathfrak m$
works. If $\dim(A) > 1$, then let $Z \subset \Spec(A)$ be an irreducible
component of dimension $> 1$. Then $V(f) \cap Z$ has dimension $> 0$
(Algebra, Lemma \ref{algebra-lemma-one-equation}). Pick a prime
$\mathfrak q \in V(f) \cap Z$, $\mathfrak q \not = \mathfrak m$
corresponding to a closed point of the punctured spectrum of $A$;
this is possible by
Properties, Lemma \ref{properties-lemma-complement-closed-point-Jacobson}.
Then $\mathfrak q$ is not the generic point of $Z$. Hence
$0 < \dim(A_\mathfrak q) < \dim(A)$ and $f \in \mathfrak q A_\mathfrak q$.
By induction on the dimension we can find
$f \in \mathfrak p \subset A_\mathfrak q$ with
$\dim((A_\mathfrak q)_\mathfrak p) = 1$.
Then $\mathfrak p \cap A$ works.
\end{proof}

\begin{lemma}
\label{lemma-ramification-quasi-finite-flat}
Let $f : X \to Y$ be a morphism of locally Noetherian schemes.
Let $x \in X$. Assume
\begin{enumerate}
\item $f$ is flat,
\item $f$ is quasi-finite at $x$,
\item $x$ is not a generic point of an irreducible component of $X$,
\item for specializations $x' \leadsto x$ with
$\dim(\mathcal{O}_{X, x'}) = 1$ our $f$ is unramified at $x'$.
\end{enumerate}
Then $f$ is \'etale at $x$.
\end{lemma}

\begin{proof}
Observe that the set of points where $f$ is unramified is the same as
the set of points where $f$ is \'etale and that this set is open.
See Morphisms, Definitions \ref{morphisms-definition-unramified}
and \ref{morphisms-definition-etale} and
Lemma \ref{morphisms-lemma-flat-unramified-etale}.
To check $f$ is \'etale at $x$ we may work \'etale
locally on the base and on the
target (Descent, Lemmas \ref{descent-lemma-descending-property-etale} and
\ref{descent-lemma-etale-etale-local-source}).
Thus we can apply More on Morphisms, Lemma
\ref{more-morphisms-lemma-etale-makes-quasi-finite-finite-at-point}
and assume that $f : X \to Y$ is finite and that $x$ is the unique
point of $X$ lying over $y = f(x)$.
Then it follows that $f$ is finite locally free
(Morphisms, Lemma \ref{morphisms-lemma-finite-flat}).

\medskip\noindent
Assume $f$ is finite locally free and that $x$ is the unique point of
$X$ lying over $y = f(x)$. By
Discriminants, Lemma \ref{discriminant-lemma-discriminant}
we find a locally principal closed subscheme $D_\pi \subset Y$
such that $y' \in D_\pi$ if and only if there exists an $x' \in X$
with $f(x') = y'$ and $f$ ramified at $x'$. Thus we have to prove
that $y \not \in D_\pi$. Assume $y \in D_\pi$ to get a contradiction.

\medskip\noindent
By condition (3) we have $\dim(\mathcal{O}_{X, x}) \geq 1$.
We have $\dim(\mathcal{O}_{X, x}) = \dim(\mathcal{O}_{Y, y})$ by
Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total}.
By Lemma \ref{lemma-find-point-codim-1}
we can find $y' \in D_\pi$ specializing to $y$
with $\dim(\mathcal{O}_{Y, y'}) = 1$.
Choose $x' \in X$ with $f(x') = y'$ where $f$ is ramified. Since $f$
is finite it is closed, and hence $x' \leadsto x$.
We have $\dim(\mathcal{O}_{X, x'}) = \dim(\mathcal{O}_{Y, y'}) = 1$
as before. This contradicts property (4).
\end{proof}

\begin{lemma}
\label{lemma-local-purity}
Let $(A, \mathfrak m)$ be a regular local ring of dimension $d \geq 2$.
Set $X = \Spec(A)$ and $U = X \setminus \{\mathfrak m\}$. Then
\begin{enumerate}
\item the functor $\textit{F\'Et}_X \to \textit{F\'Et}_U$
is essentially surjective, i.e., purity holds for $A$,
\item any finite $A \to B$ with $B$ normal which
induces a finite \'etale morphism on punctured spectra is \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Recall that a regular local ring is normal by
Algebra, Lemma \ref{algebra-lemma-regular-normal}.
Hence (1) and (2) are equivalent by
Lemma \ref{lemma-reformulate-purity-normal}.
We prove the lemma by induction on $d$.

\medskip\noindent
The case $d = 2$. In this case $A \to B$ is flat.
Namely, we have going down for $A \to B$ by
Algebra, Proposition \ref{algebra-proposition-going-down-normal-integral}.
Then $\dim(B_{\mathfrak m'}) = 2$ for all maximal ideals
$\mathfrak m' \subset B$ by
Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total}.
Then $B_{\mathfrak m'}$ is Cohen-Macaulay by
Algebra, Lemma \ref{algebra-lemma-criterion-normal}.
Hence and this is the important step
Algebra, Lemma \ref{algebra-lemma-CM-over-regular-flat}
applies to show $A \to B_{\mathfrak m'}$ is flat.
Then Algebra, Lemma \ref{algebra-lemma-flat-localization}
shows $A \to B$ is flat. Thus we can apply
Lemma \ref{lemma-ramification-quasi-finite-flat}
(or you can directly argue using the easier
Discriminants, Lemma \ref{discriminant-lemma-discriminant})
to see that $A \to B$ is \'etale.

\medskip\noindent
The case $d \geq 3$. Let $V \to U$ be finite \'etale.
Let $f \in \mathfrak m_A$, $f \not \in \mathfrak m_A^2$.
Then $A/fA$ is a regular local ring of dimension $d - 1 \geq 2$, see
Algebra, Lemma \ref{algebra-lemma-regular-ring-CM}.
Let $U_0$ be the punctured spectrum of $A/fA$ and let
$V_0 = V \times_U U_0$.
By Lemma \ref{lemma-lift-purity}
it suffices to show that $V_0$ is in the essential
image of $\textit{F\'Et}_{\Spec(A/fA)} \to \textit{F\'Et}_{U_0}$.
This follows from the induction hypothesis.
\end{proof}

\begin{lemma}[Purity of branch locus]
\label{lemma-purity}
\begin{reference}
\cite{Nagata-Purity} and \cite[Exp. X, Thm. 3.1]{SGA1}
\end{reference}
\begin{history}
This result was first stated and proved by Zariski in
geometric form in \cite{Zariski-Purity}.
The generalization to nonperfect ground fields by Nagata
was published as the next article in the same volume of the
Proceedings of the National Academy of Sciences of the United States of America
in \cite{Nagata-Remarks-Purity}. In the following year Nagata
proved the result for Noetherian local rings in \cite{Nagata-Purity}.
His proof uses a result of Chow which is a Bertini theorem for
complete local domains, see \cite{Chow-Bertini};
the history of Bertini's theorems is discussed in
Kleiman's historical article \cite{Kleiman-Bertini}.
A few years later a completely different proof was found by
Auslander, see \cite{Auslander-Purity}.
\end{history}
Let $f : X \to Y$ be a morphism of locally Noetherian schemes.
Let $x \in X$ and set $y = f(x)$. Assume
\begin{enumerate}
\item $\mathcal{O}_{X, x}$ is normal,
\item $\mathcal{O}_{Y, y}$ is regular,
\item $f$ is quasi-finite at $x$,
\item $\dim(\mathcal{O}_{X, x}) = \dim(\mathcal{O}_{Y, y}) \geq 1$
\item for specializations $x' \leadsto x$ with
$\dim(\mathcal{O}_{X, x'}) = 1$ our $f$ is unramified at $x'$.
\end{enumerate}
Then $f$ is \'etale at $x$.
\end{lemma}

\begin{proof}
We will prove the lemma by induction on
$d = \dim(\mathcal{O}_{X, x}) = \dim(\mathcal{O}_{Y, y})$.

\medskip\noindent
An uninteresting case is when $d = 1$.
In that case we are assuming that $f$ is unramified at $x$
and that $\mathcal{O}_{Y, y}$ is a discrete valuation ring
(Algebra, Lemma \ref{algebra-lemma-characterize-dvr}).
Then $\mathcal{O}_{X, x}$ is flat over $\mathcal{O}_{Y, y}$
(otherwise the map would not be quasi-finite at $x$)
and we see that $f$ is flat at $x$. Since flat $+$
unramified is \'etale we conclude (some details omitted).

\medskip\noindent
The case $d \geq 2$. We will use induction on $d$ to reduce
to the case discussed in Lemma \ref{lemma-local-purity}.
To check $f$ is \'etale at $x$ we may work \'etale locally
on the base and on the target
(Descent, Lemmas \ref{descent-lemma-descending-property-etale} and
\ref{descent-lemma-etale-etale-local-source}).
Thus we can apply More on Morphisms, Lemma
\ref{more-morphisms-lemma-etale-makes-quasi-finite-finite-at-point}
and assume that $f : X \to Y$ is finite and that $x$ is the unique
point of $X$ lying over $y$. Here we use that \'etale extensions of
local rings do not change dimension, normality, and regularity, see
More on Algebra, Section \ref{more-algebra-section-permanence-etale}
and
\'Etale Morphisms, Section \ref{etale-section-properties-permanence}.

\medskip\noindent
Next, we can base change by $\Spec(\mathcal{O}_{Y, y})$
and assume that $Y$ is the spectrum of a regular local ring.
It follows that $X = \Spec(\mathcal{O}_{X, x})$ as
every point of $X$ necessarily specializes to $x$.

\medskip\noindent
The ring map $\mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$ is
finite and necessarily injective (by equality of dimensions).
We conclude we have going down for
$\mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$ by
Algebra, Proposition \ref{algebra-proposition-going-down-normal-integral}
(and the fact that a regular ring is a normal ring by
Algebra, Lemma \ref{algebra-lemma-regular-normal}).
Pick $x' \in X$, $x' \not = x$ with image $y' = f(x')$.
Then $\mathcal{O}_{X, x'}$ is normal as a localization
of a normal domain. Similarly, $\mathcal{O}_{Y, y'}$ is
regular (see Algebra, Lemma
\ref{algebra-lemma-localization-of-regular-local-is-regular}).
We have $\dim(\mathcal{O}_{X, x'}) = \dim(\mathcal{O}_{Y, y'})$ by
Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total}
(we checked going down above).
Of course these dimensions are strictly less than $d$ as $x' \not = x$
and by induction on $d$ we conclude that $f$ is \'etale at $x'$.

\medskip\noindent
Thus we arrive at the following situation: We have a finite
local homomorphism $A \to B$ of Noetherian local rings
of dimension $d \geq 2$, with $A$ regular, $B$ normal, which
induces a finite \'etale morphism $V \to U$ on punctured spectra.
Our goal is to show that $A \to B$ is \'etale.
This follows from Lemma \ref{lemma-local-purity}
and the proof is complete.
\end{proof}

\noindent
The following lemma is sometimes useful to find the maximal
open subset over which a finite \'etale morphism extends.

\begin{lemma}
\label{lemma-extend-S2}
Let $j : U \to X$ be an open immersion of locally Noetherian schemes
such that $\text{depth}(\mathcal{O}_{X, x}) \geq 2$ for $x \not \in U$.
Let $\pi : V \to U$ be finite \'etale. Then
\begin{enumerate}
\item $\mathcal{B} = j_*\pi_*\mathcal{O}_V$ is a reflexive coherent
$\mathcal{O}_X$-algebra, set $Y = \underline{\Spec}_X(\mathcal{B})$,
\item $Y \to X$ is the unique finite morphism such that
$V = Y \times_X U$ and $\text{depth}(\mathcal{O}_{Y, y}) \geq 2$
for $y \in Y \setminus V$,
\item $Y \to X$ is \'etale at $y$ if and only if $Y \to X$ is flat at $y$, and
\item $Y \to X$ is \'etale if and only if $\mathcal{B}$
is finite locally free as an $\mathcal{O}_X$-module.
\end{enumerate}
Moreover, (a) the construction of $\mathcal{B}$ and $Y \to X$ commutes
with base change by flat morphisms $X' \to X$ of locally Noetherian
schemes, and (b) if $V' \to U'$ is a finite \'etale morphism with
$U \subset U' \subset X$ open which restricts to $V \to U$ over $U$,
then there is a unique isomorphism $Y' \times_X U' = V'$ over $U'$.
\end{lemma}

\begin{proof}
Observe that $\pi_*\mathcal{O}_V$ is a finite locally free
$\mathcal{O}_U$-module, in particular reflexive.
By Divisors, Lemma \ref{divisors-lemma-reflexive-S2-extend}
the module $j_*\pi_*\mathcal{O}_V$ is the unique
reflexive coherent module on $X$ restricting to
$\pi_*\mathcal{O}_V$ over $U$. This proves (1).

\medskip\noindent
By construction $Y \times_X U = V$.
Since $\mathcal{B}$ is coherent, we see that $Y \to X$ is finite.
We have $\text{depth}(\mathcal{B}_x) \geq 2$ for $x \in X \setminus U$
by Divisors, Lemma \ref{divisors-lemma-reflexive-S2}.
Hence $\text{depth}(\mathcal{O}_{Y, y}) \geq 2$ for $y \in Y \setminus V$
by Algebra, Lemma \ref{algebra-lemma-depth-goes-down-finite}.
Conversely, suppose that $\pi' : Y' \to X$ is a finite morphism such that
$V = Y' \times_X U$ and $\text{depth}(\mathcal{O}_{Y', y'}) \geq 2$
for $y' \in Y' \setminus V$. Then $\pi'_*\mathcal{O}_{Y'}$
restricts to $\pi_*\mathcal{O}_V$ over $U$ and satisfies
$\text{depth}((\pi'_*\mathcal{O}_{Y'})_x) \geq 2$ for
$x \in X \setminus U$ by
Algebra, Lemma \ref{algebra-lemma-depth-goes-down-finite}.
Then $\pi'_*\mathcal{O}_{Y'}$ is canonically isomorphic
to $j_*\pi_*\mathcal{O}_V$ for example by
Divisors, Lemma \ref{divisors-lemma-depth-2-hartog}.
This proves (2).

\medskip\noindent
If $Y \to X$ is \'etale at $y$, then $Y \to X$ is flat at $y$.
Conversely, suppose that $Y \to X$ is flat at $y$.
If $y \in V$, then $Y \to X$ is \'etale at $y$.
If $y \not \in V$, then we check (1), (2), (3), and (4) of
Lemma \ref{lemma-ramification-quasi-finite-flat} hold
to see that $Y \to X$ is \'etale at $y$. Parts (1) and (2)
are clear and so is (3) since $\text{depth}(\mathcal{O}_{Y, y}) \geq 2$.
If $y' \leadsto y$ is a specialization and $\dim(\mathcal{O}_{Y, y'}) = 1$,
then $y' \in V$ since otherwise the depth of this local ring
would be $2$ a contradiction by
Algebra, Lemma \ref{algebra-lemma-bound-depth}.
Hence $Y \to X$ is \'etale at $y'$ and we conclude (4) of
Lemma \ref{lemma-ramification-quasi-finite-flat} holds too.
This finishes the proof of (3).

\medskip\noindent
Part (4) follows from (3) and the fact that $((Y \to X)_*\mathcal{O}_Y)_x$
is a flat $\mathcal{O}_{X, x}$-module if and only if $\mathcal{O}_{Y, y}$
is a flat $\mathcal{O}_{X, x}$-module for all $y \in Y$ mapping to $x$, see
Algebra, Lemma \ref{algebra-lemma-flat-localization}. Here we also
use that a finite flat module over a Noetherian ring is finite locally
free, see Algebra, Lemma \ref{algebra-lemma-finite-projective}
(and
Algebra, Lemma
\ref{algebra-lemma-Noetherian-finite-type-is-finite-presentation}).

\medskip\noindent
As to the final assertions of the lemma, part (a) follows from
flat base change, see
Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}
and part (b) follows from the uniqueness in (2) applied to the restriction
$Y \times_X U'$.
\end{proof}

\begin{lemma}
\label{lemma-extend-pure}
Let $j : U \to X$ be an open immersion of Noetherian schemes
such that purity holds for $\mathcal{O}_{X, x}$ for all $x \not \in U$.
Then
$$
\textit{F\'Et}_X \longrightarrow \textit{F\'Et}_U
$$
is essentially surjective.
\end{lemma}

\begin{proof}
Let $V \to U$ be a finite \'etale morphism. By Noetherian
induction it suffices to extend $V \to U$ to a finite \'etale
morphism to a strictly larger open subset of $X$.
Let $x \in X \setminus U$ be the generic point of
an irreducible component of $X \setminus U$.
Then the inverse image $U_x$ of $U$ in $\Spec(\mathcal{O}_{X, x})$
is the punctured spectrum of $\mathcal{O}_{X, x}$.
By assumption $V_x = V \times_U U_x$ is the restriction
of a finite \'etale morphism $Y_x \to \Spec(\mathcal{O}_{X, x})$
to $U_x$.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
we find an open subscheme $U \subset U' \subset X$
containing $x$ and a morphism $V' \to U'$ of finite presentation
whose restriction to $U$ recovers $V \to U$ and
whose restriction to $\Spec(\mathcal{O}_{X, x})$ recovering $Y_x$.
Finally, the morphism $V' \to U'$ is finite \'etale
after possible shrinking $U'$ to a smaller open by
Limits, Lemma \ref{limits-lemma-glueing-near-point-properties}.
\end{proof}
















\section{Finite \'etale covers of punctured spectra, II}
\label{section-pi1-punctured-spec-II}

\noindent
In this section we prove some variants of the material discussed
in Section \ref{section-pi1-punctured-spec}. Suppose
we have a Noetherian local ring $(A, \mathfrak m)$ and $f \in \mathfrak m$.
We set $X = \Spec(A)$ and $X_0 = \Spec(A/fA)$ and we
let $U = X \setminus \{\mathfrak m\}$ and
$U_0 = X_0 \setminus \{\mathfrak m\}$ be the punctured spectrum of
$A$ and $A/fA$. All of this is exactly as in
Situation \ref{situation-local-lefschetz}.
The difference is that we will consider the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
In other words, we will not try to lift finite \'etale coverings
of $U_0$ to all of $U$, but just to some open neighbourhood
$U'$ of $U_0$ in $U$.

\begin{lemma}
\label{lemma-faithful-general}
In Situation \ref{situation-local-lefschetz}. Let $U' \subset U$
be open and contain $U_0$. Assume for $\mathfrak p \subset A$ minimal
with $\mathfrak p \in U'$, $\mathfrak p \not \in U_0$ we have
$\dim(A/\mathfrak p) \geq 2$. Then
$$
\textit{F\'Et}_{U'} \longrightarrow \textit{F\'Et}_{U_0},\quad
V' \longmapsto V_0 = V' \times_{U'} U_0
$$
is a faithful functor. Moreover, there exists a $U'$ satisfying
the assumption and any smaller open $U'' \subset U'$ containing
$U_0$ also satisfies this assumption. In particular, the restriction
functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is faithful.
\end{lemma}

\begin{proof}
By Algebra, Lemma \ref{algebra-lemma-one-equation}
we see that $V(\mathfrak p)$ meets $U_0$ for
every prime $\mathfrak p$ of $A$ with $\dim(A/\mathfrak p) \geq 2$.
Thus the displayed functor is faithful for a $U$ as in the statement
by Lemma \ref{lemma-restriction-faithful}.
To see the existence of such a $U'$ note that for
$\mathfrak p \subset A$ with $\mathfrak p \in U$,
$\mathfrak p \not \in U_0$ with $\dim(A/\mathfrak p) = 1$
then $\mathfrak p$ corresponds to a closed point of $U$
and hence $V(\mathfrak p) \cap U_0 = \emptyset$.
Thus we can take $U'$ to be the complement of the irreducible
components of $X$ which do not meet $U_0$ and have dimension $1$.
\end{proof}

\begin{lemma}
\label{lemma-fully-faithful-general-better}
In Situation \ref{situation-local-lefschetz} assume
\begin{enumerate}
\item $A$ has a dualizing complex and is $f$-adically complete,
\item every irreducible component of $X$ not contained in $X_0$
has dimension $\geq 3$.
\end{enumerate}
Then the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is fully faithful.
\end{lemma}

\begin{proof}
To prove this we may replace $A$ by its reduction by the topological
invariance of the fundamental group, see Lemma \ref{lemma-thickening}.
Then the result follows from
Lemma \ref{lemma-restriction-fully-faithful-general}
and Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-fully-faithful-general}.
\end{proof}

\begin{lemma}
\label{lemma-fully-faithful-general}
In Situation \ref{situation-local-lefschetz} assume
\begin{enumerate}
\item $A$ is $f$-adically complete,
\item $f$ is a nonzerodivisor.
\item $H^1_\mathfrak m(A/fA)$ is a finite $A$-module.
\end{enumerate}
Then the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is fully faithful.
\end{lemma}

\begin{proof}
Follows from
Lemma \ref{lemma-restriction-fully-faithful-general} and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-fully-faithful-general-alternative}.
\end{proof}








\section{Finite \'etale covers of punctured spectra, III}
\label{section-pi1-punctured-spec-III}

\noindent
In this section we study when in Situation \ref{situation-local-lefschetz}.
the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is an equivalence of categories.

\begin{lemma}
\label{lemma-essentially-surjective-general-better}
In Situation \ref{situation-local-lefschetz} assume
\begin{enumerate}
\item $A$ has a dualizing complex and is $f$-adically complete,
\item one of the following is true
\begin{enumerate}
\item $A_f$ is $(S_2)$ and every irreducible component of $X$
not contained in $X_0$ has dimension $\geq 4$, or
\item if $\mathfrak p \not \in V(f)$ and
$V(\mathfrak p) \cap V(f) \not = \{\mathfrak m\}$, then
$\text{depth}(A_\mathfrak p) + \dim(A/\mathfrak p) > 3$.
\end{enumerate}
\end{enumerate}
Then the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is an equivalence.
\end{lemma}

\begin{proof}
This follows from Lemma \ref{lemma-restriction-equivalence-general}
and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-equivalence-better}.
\end{proof}

\begin{lemma}
\label{lemma-essentially-surjective-general}
In Situation \ref{situation-local-lefschetz} assume
\begin{enumerate}
\item $A$ is $f$-adically complete,
\item $f$ is a nonzerodivisor,
\item $H^1_\mathfrak m(A/fA)$ and $H^2_\mathfrak m(A/fA)$
are finite $A$-modules.
\end{enumerate}
Then the restriction functor
$$
\colim_{U_0 \subset U' \subset U\text{ open}} \textit{F\'Et}_{U'}
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is an equivalence.
\end{lemma}

\begin{proof}
This follows from Lemma \ref{lemma-restriction-equivalence-general}
and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-equivalence}.
\end{proof}

\begin{remark}
\label{remark-combine}
Let $(A, \mathfrak m)$ be a complete local Noetherian ring and
$f \in \mathfrak m$ nonzero. Suppose that $A_f$ is $(S_2)$ and
every irreducible component of $\Spec(A)$ has dimension $\geq 4$.
Then Lemma \ref{lemma-essentially-surjective-general-better}
tells us that the category
$$
\colim\nolimits_{U' \subset U\text{ open, }U_0 \subset U}
\text{ category of schemes finite \'etale over }U'
$$
is equivalent to the category of schemes finite \'etale over $U_0$.
For example this holds if $A$ is a normal domain of dimension $\geq 4$!
\end{remark}




\section{Finite \'etale covers of punctured spectra, IV}
\label{section-pi1-punctured-spec-IV}

\noindent
Let $X, X_0, U, U_0$ be as in Situation \ref{situation-local-lefschetz}.
In this section we ask when the restriction functor
$$
\textit{F\'Et}_U
\longrightarrow
\textit{F\'Et}_{U_0}
$$
is essentially surjective.
We will do this by taking results from
Section \ref{section-pi1-punctured-spec-III}
and then filling in the gaps using purity. Recall that
we say {\it purity holds} for a Noetherian local ring
$(A, \mathfrak m)$ if the restriction functor
$\textit{F\'Et}_X \to \textit{F\'Et}_U$ is essentially
surjective where $X = \Spec(A)$ and $U = X \setminus \{\mathfrak m\}$.

\begin{lemma}
\label{lemma-equivalence-better}
In Situation \ref{situation-local-lefschetz} assume
\begin{enumerate}
\item $A$ has a dualizing complex and is $f$-adically complete,
\item one of the following is true
\begin{enumerate}
\item $A_f$ is $(S_2)$ and every irreducible component of $X$
not contained in $X_0$ has dimension $\geq 4$, or
\item if $\mathfrak p \not \in V(f)$ and
$V(\mathfrak p) \cap V(f) \not = \{\mathfrak m\}$, then
$\text{depth}(A_\mathfrak p) + \dim(A/\mathfrak p) > 3$.
\end{enumerate}
\item for every maximal ideal $\mathfrak p \subset A_f$
purity holds for $(A_f)_\mathfrak p$.
\end{enumerate}
Then the restriction functor $\textit{F\'Et}_U \to \textit{F\'Et}_{U_0}$
is essentially surjective.
\end{lemma}

\begin{proof}
Let $V_0 \to U_0$ be a finite \'etale morphism. By
Lemma \ref{lemma-essentially-surjective-general-better}
there exists an open $U' \subset U$ containing $U_0$ and
a finite \'etale morphism $V' \to U$ whose base change to $U_0$
is isomorphic to $V_0 \to U_0$. Since $U' \supset U_0$
we see that $U \setminus U'$ consists of points corresponding
to prime ideals $\mathfrak p_1, \ldots, \mathfrak p_n$ as in (3).
By assumption we can find finite \'etale morphisms
$V'_i \to \Spec(A_{\mathfrak p_i})$ agreeing with
$V' \to U'$ over $U' \times_U \Spec(A_{\mathfrak p_i})$.
By Limits, Lemma \ref{limits-lemma-glueing-near-closed-point}
applied $n$ times we see that $V' \to U'$ extends to a finite \'etale
morphism $V \to U$.
\end{proof}

\begin{lemma}
\label{lemma-equivalence}
Let $(A, \mathfrak m)$ be a Noetherian local ring.
Let $f \in \mathfrak m$. Assume
\begin{enumerate}
\item $A$ is $f$-adically complete,
\item $f$ is a nonzerodivisor,
\item $H^1_\mathfrak m(A/fA)$ and $H^2_\mathfrak m(A/fA)$ are finite
$A$-modules,
\item for every maximal ideal $\mathfrak p \subset A_f$
purity holds for $(A_f)_\mathfrak p$.
\end{enumerate}
Then the restriction functor $\textit{F\'Et}_U \to \textit{F\'Et}_{U_0}$
is essentially surjective.
\end{lemma}

\begin{proof}
The proof is identical to the proof of
Lemma \ref{lemma-equivalence-better}
using
Lemma \ref{lemma-essentially-surjective-general}
in stead of
Lemma \ref{lemma-essentially-surjective-general-better}.
\end{proof}



\section{Purity in local case, II}
\label{section-local-purity-II}

\noindent
This section is the continuation of Section \ref{section-local-purity}.
Recall that we say {\it purity holds} for a Noetherian local ring
$(A, \mathfrak m)$ if the restriction functor
$\textit{F\'Et}_X \to \textit{F\'Et}_U$ is essentially
surjective where $X = \Spec(A)$ and $U = X \setminus \{\mathfrak m\}$.

\begin{lemma}
\label{lemma-purity-inherited-by-hypersurface-better}
Let $(A, \mathfrak m)$ be a Noetherian local ring.
Let $f \in \mathfrak m$. Assume
\begin{enumerate}
\item $A$ has a dualizing complex and is $f$-adically complete,
\item one of the following is true
\begin{enumerate}
\item $A_f$ is $(S_2)$ and every irreducible component of $X$
not contained in $X_0$ has dimension $\geq 4$, or
\item if $\mathfrak p \not \in V(f)$ and
$V(\mathfrak p) \cap V(f) \not = \{\mathfrak m\}$, then
$\text{depth}(A_\mathfrak p) + \dim(A/\mathfrak p) > 3$.
\end{enumerate}
\item for every maximal ideal $\mathfrak p \subset A_f$
purity holds for $(A_f)_\mathfrak p$, and
\item purity holds for $A$.
\end{enumerate}
Then purity holds for $A/fA$.
\end{lemma}

\begin{proof}
Denote $X = \Spec(A)$ and $U = X \setminus \{\mathfrak m\}$
the punctured spectrum. Similarly we have $X_0 = \Spec(A/fA)$
and $U_0 = X_0 \setminus \{\mathfrak m\}$.
Let $V_0 \to U_0$ be a finite \'etale morphism. By
Lemma \ref{lemma-equivalence-better}
we find a finite \'etale morphism $V \to U$
whose base change to $U_0$
is isomorphic to $V_0 \to U_0$.
By assumption (5) we find that $V \to U$ extends
to a finite \'etale morphism $Y \to X$. Then the restriction of
$Y$ to $X_0$ is the desired extension of $V_0 \to U_0$.
\end{proof}

\begin{lemma}
\label{lemma-purity-inherited-by-hypersurface}
Let $(A, \mathfrak m)$ be a Noetherian local ring.
Let $f \in \mathfrak m$. Assume
\begin{enumerate}
\item $A$ is $f$-adically complete,
\item $f$ is a nonzerodivisor,
\item $H^1_\mathfrak m(A/fA)$ and $H^2_\mathfrak m(A/fA)$ are finite
$A$-modules,
\item for every maximal ideal $\mathfrak p \subset A_f$
purity holds for $(A_f)_\mathfrak p$,
\item purity holds for $A$.
\end{enumerate}
Then purity holds for $A/fA$.
\end{lemma}

\begin{proof}
The proof is identical to the proof of
Lemma \ref{lemma-purity-inherited-by-hypersurface-better}
using
Lemma \ref{lemma-equivalence}
in stead of
Lemma \ref{lemma-equivalence-better}.
\end{proof}

\noindent
Now we can bootstrap the earlier results to prove that
purity holds for complete intersections of dimension $\geq 3$.
Recall that a Noetherian local ring is called a complete
intersection if its completion is the quotient of a
regular local ring by the ideal generated by a regular sequence.
See the discussion in Divided Power Algebra, Section \ref{dpa-section-lci}.

\begin{proposition}
\label{proposition-purity-complete-intersection}
Let $(A, \mathfrak m)$ be a Noetherian local ring. If $A$ is a
complete intersection of dimension $\geq 3$, then purity
holds for $A$ in the sense that any finite \'etale cover of
the punctured spectrum extends.
\end{proposition}

\begin{proof}
By Lemma \ref{lemma-purity-and-completion} we may assume that $A$ is
a complete local ring. By assumption we can write
$A = B/(f_1, \ldots, f_r)$ where $B$ is a complete regular local
ring and $f_1, \ldots, f_r$ is a regular sequence.
We will finish the proof by induction on $r$.
The base case is $r = 0$ which follows from
Lemma \ref{lemma-local-purity} which applies to
regular rings of dimension $\geq 2$.

\medskip\noindent
Assume that $A = B/(f_1, \ldots, f_r)$ and that the proposition
holds for $r - 1$. Set $A' = B/(f_1, \ldots, f_{r - 1})$ and apply
Lemma \ref{lemma-purity-inherited-by-hypersurface} to $f_r \in A'$.
This is permissible:
condition (1) holds as $f_1, \ldots, f_r$ is a regular sequence,
condition (2) holds as $B$ and hence $A'$ is complete,
condition (3) holds as $A = A'/f_r A'$ is Cohen-Macaulay of dimension
$\dim(A) \geq 3$, see Dualizing Complexes, Lemma \ref{dualizing-lemma-depth},
condition (4) holds by induction hypothesis as
$\dim((A'_{f_r})_\mathfrak p) \geq 3$ for a maximal
prime $\mathfrak p$ of $A'_{f_r}$ and as
$(A'_{f_r})_\mathfrak p = B_\mathfrak q/(f_1, \ldots, f_{r - 1})$
for some $\mathfrak q \subset B$,
condition (5) holds by induction hypothesis.
\end{proof}




\section{Purity in local case, III}
\label{section-local-purity-III}

\noindent
In this section is a continuation of the discussion in
Sections \ref{section-local-purity} and \ref{section-local-purity-II}.

\begin{lemma}
\label{lemma-fully-faithful-power-series-over-depth2}
Let $(A, \mathfrak m)$ be a Noetherian local ring of depth $\geq 2$.
Let $B = A[[x_1, \ldots, x_d]]$ with $d \geq 1$.
Set $Y = \Spec(B)$ and $Y_0 = V(x_1, \ldots, x_d)$.
For any open subscheme $V \subset Y$ with
$V_0 = V \cap Y_0$ equal to $Y_0 \setminus \{\mathfrak m_B\}$
the restriction functor
$$
\textit{F\'Et}_V \longrightarrow \textit{F\'Et}_{V_0}
$$
is fully faithful.
\end{lemma}

\begin{proof}
Set $I = (x_1, \ldots, x_d)$. Set $X = \Spec(A)$.
If we use the map $Y \to X$ to identify $Y_0$ with $X$,
then $V_0$ is identified with the punctured spectrum $U$ of $A$.
Pushing forward modules by this affine morphism we get
\begin{align*}
\lim_n \Gamma(V_0, \mathcal{O}_V/I^n\mathcal{O}_V)
& =
\lim_n \Gamma(V_0, \mathcal{O}_Y/I^n\mathcal{O}_Y) \\
& =
\lim_n \Gamma(U, \mathcal{O}_U[x_1, \ldots, x_d]/(x_1, \ldots, x_d)^n) \\
& =
\lim_n A[x_1, \ldots, x_d]/(x_1, \ldots, x_d)^n \\
& =
B
\end{align*}
Namely, as the depth of $A$ is $\geq 2$ we have $\Gamma(U, \mathcal{O}_U) = A$,
see Local Cohomology, Lemma
\ref{local-cohomology-lemma-finiteness-pushforwards-and-H1-local}.
Thus for any $V \subset Y$ open as in the lemma we get
$$
B = \Gamma(Y, \mathcal{O}_Y) \to \Gamma(V, \mathcal{O}_V) \to
\lim_n \Gamma(V_0, \mathcal{O}_Y/I^n\mathcal{O}_Y) = B
$$
which implies both arrows are isomorphisms (small detail omitted).
By Algebraic and Formal Geometry, Lemma 
\ref{algebraization-lemma-completion-fully-faithful}
we conclude that
$\textit{Coh}(\mathcal{O}_V) \to \textit{Coh}(V, I\mathcal{O}_V)$
is fully faithful on the full subcategory of finite locally free objects.
Thus we conclude by
Lemma \ref{lemma-restriction-fully-faithful}.
\end{proof}

\begin{lemma}
\label{lemma-purity-power-series-over-depth2}
\begin{slogan}
Ramanujam-Samuel for finite \'etale covers
\end{slogan}
Let $(A, \mathfrak m)$ be a Noetherian local ring of depth $\geq 2$. Let
$B = A[[x_1, \ldots, x_d]]$ with $d \geq 1$. For any open
$V \subset Y = \Spec(B)$ which contains
\begin{enumerate}
\item any prime $\mathfrak q \subset B$ such that
$\mathfrak q \cap A \not = \mathfrak m$,
\item the prime $\mathfrak m B$
\end{enumerate}
the functor
$
\textit{F\'Et}_Y
\to
\textit{F\'Et}_V
$
is an equivalence. In particular purity holds for $B$.
\end{lemma}

\begin{proof}
A prime $\mathfrak q \subset B$ which is not contained in $V$
lies over $\mathfrak m$. In this case $A \to B_\mathfrak q$
is a flat local homomorphism and hence $\text{depth}(B_\mathfrak q) \geq 2$
(Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}).
Thus the functor is fully faithful by
Lemma \ref{lemma-quasi-compact-dense-open-connected-at-infinity-Noetherian}
combined with Local Cohomology,
Lemma \ref{local-cohomology-lemma-depth-2-connected-punctured-spectrum}.

\medskip\noindent
Let $W \to V$ be a finite \'etale morphism. Let $B \to C$ be the unique finite
ring map such that $\Spec(C) \to Y$ is the finite morphism extending
$W \to V$ constructed in Lemma \ref{lemma-extend-S2}.
Observe that $C = \Gamma(W, \mathcal{O}_W)$.

\medskip\noindent
Set $Y_0 = V(x_1, \ldots, x_d)$ and $V_0 = V \cap Y_0$. Set $X = \Spec(A)$.
If we use the map $Y \to X$ to identify $Y_0$ with $X$,
then $V_0$ is identified with the punctured spectrum $U$ of $A$.
Thus we may view $W_0 = W \times_Y Y_0$ as a finite \'etale scheme
over $U$. Then
$$
W_0 \times_U (U \times_X Y)
\quad\text{and}\quad
W \times_V (U \times_X Y)
$$
are schemes finite \'etale over $U \times_X Y$ which restrict to
isomorphic finite \'etale schemes over $V_0$. By
Lemma \ref{lemma-fully-faithful-power-series-over-depth2}
applied to the open $U \times_X Y$ we obtain an isomorphism
$$
W_0 \times_U (U \times_X Y) \longrightarrow W \times_V (U \times_X Y)
$$
over $U \times_X Y$.

\medskip\noindent
Observe that $C_0 = \Gamma(W_0, \mathcal{O}_{W_0})$ is a finite $A$-algebra
by Lemma \ref{lemma-extend-S2} applied to $W_0 \to U \subset X$ (exactly
as we did for $B \to C$ above). Since the construction in
Lemma \ref{lemma-extend-S2} is compatible with flat base change
and with change of opens, the isomorphism above induces
an isomorphism
$$
\Psi : C \longrightarrow C_0 \otimes_A B
$$
of finite $B$-algebras. However, we know that $\Spec(C) \to Y$
is \'etale at all points above at least one point of $Y$ lying
over $\mathfrak m \in X$. Since $\Psi$ is an isomorphism, we
conclude that $\Spec(C_0) \to X$
is \'etale above $\mathfrak m$ (small detail omitted).
Of course this means that $A \to C_0$ is finite
\'etale and hence $B \to C$ is finite \'etale.
\end{proof}

\begin{lemma}
\label{lemma-purity-smooth-over-depth2}
Let $f : X \to S$ be a morphism of schemes. Let $U \subset X$
be an open subscheme. Assume
\begin{enumerate}
\item $f$ is smooth,
\item $S$ is Noetherian,
\item for $s \in S$ with $\text{depth}(\mathcal{O}_{S, s}) \leq 1$
we have $X_s = U_s$,
\item $U_s \subset X_s$ is dense for all $s \in S$.
\end{enumerate}
Then $\textit{F\'Et}_X \to \textit{F\'Et}_U$ is an equivalence.
\end{lemma}

\begin{proof}
The functor is fully faithful by
Lemma \ref{lemma-quasi-compact-dense-open-connected-at-infinity-Noetherian}
combined with Local Cohomology,
Lemma \ref{local-cohomology-lemma-depth-2-connected-punctured-spectrum}
(plus an application of
Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}
to check the depth condition).

\medskip\noindent
Let $\pi : V \to U$ be a finite \'etale morphism. Let $Y \to X$
be the finite morphism constructed in Lemma \ref{lemma-extend-S2}.
We have to show that $Y \to X$ is finite \'etale.
To show that this is true for all points $x \in X$ mapping to a
given point $s \in S$ we may perform a base change by a flat
morphism $S' \to S$ of Noetherian schemes such that $s$ is
in the image. This follows from the compatibility of the
construction in Lemma \ref{lemma-extend-S2} with flat base change.

\medskip\noindent
After enlarging $U$ we may assume $U \subset X$ is
the maximal open over which $Y \to X$ is finite \'etale.
Let $Z \subset X$ be the complement of $U$.
To get a contradiction, assume $Z \not = \emptyset$.
Let $s \in S$ be a point in the image of $Z \to S$
such that no strict generalization of $s$ is in the image.
Then after base change to $\Spec(\mathcal{O}_{S, s})$
we see that $S = \Spec(A)$ with $(A, \mathfrak m, \kappa)$
a local Noetherian ring of depth $\geq 2$ and $Z$
contained in the closed fibre $X_s$
and nowhere dense in $X_s$. Choose a closed point $z \in Z$.
Then $\kappa(z)/\kappa$ is finite (by the Hilbert Nullstellensatz, see
Algebra, Theorem \ref{algebra-theorem-nullstellensatz}).
Choose a finite flat morphism $(S', s') \to (S, s)$ of local schemes
realizing the residue field extension $\kappa(z)/\kappa$, see
Algebra, Lemma \ref{algebra-lemma-finite-free-given-residue-field-extension}.
After doing a base change by $S' \to S$ we reduce to the case
where $\kappa(z) = \kappa$.

\medskip\noindent
By More on Morphisms, Lemma \ref{more-morphisms-lemma-slice-smooth}
there exists a locally closed subscheme $S' \subset X$ passing through $z$
such that $S' \to S$ is \'etale at $z$. After performing the base change
by $S' \to S$, we may assume there is a section $\sigma : S \to X$
such that $\sigma(s) = z$. Choose an affine neighbourhood
$\Spec(B) \subset X$ of $s$. Then $A \to B$ is a smooth ring
map which has a section $\sigma : B \to A$. Denote $I = \Ker(\sigma)$
and denote $B^\wedge$ the $I$-adic completion of $B$.
Then $B^\wedge \cong A[[x_1, \ldots, x_d]]$ for some $d \geq 0$, see
Algebra, Lemma \ref{algebra-lemma-section-smooth}.
Observe that $d > 0$ since otherwise we see that $X \to S$
is \'etale at $z$ which would imply that $z$ is a generic point of
$X_s$ and hence $z \in U$ by assumption (4).
Similarly, if $d > 0$, then $\mathfrak m B^\wedge$ maps into
$U$ via the morphism $\Spec(B^\wedge) \to X$.
It suffices prove $Y \to X$ is finite \'etale after base change
to $\Spec(B^\wedge)$. Since $B \to B^\wedge$ is flat
(Algebra, Lemma \ref{algebra-lemma-completion-flat})
this follows from Lemma \ref{lemma-purity-power-series-over-depth2}
and the uniqueness in the construction of $Y \to X$.
\end{proof}

\begin{proposition}
\label{proposition-purity-smooth-over-depth2}
Let $A \to B$ be a local homomorphism of local Noetherian rings.
Assume $A$ has depth $\geq 2$, $A \to B$ is formally smooth for the
$\mathfrak m_B$-adic topology, and $\dim(B) > \dim(A)$. For any open
$V \subset Y = \Spec(B)$ which contains
\begin{enumerate}
\item any prime $\mathfrak q \subset B$ such that
$\mathfrak q \cap A \not = \mathfrak m_A$,
\item the prime $\mathfrak m_A B$
\end{enumerate}
the functor $\textit{F\'Et}_Y \to \textit{F\'Et}_V$
is an equivalence. In particular purity holds for $B$.
\end{proposition}

\begin{proof}
A prime $\mathfrak q \subset B$ which is not contained in $V$
lies over $\mathfrak m_A$. In this case $A \to B_\mathfrak q$
is a flat local homomorphism and hence $\text{depth}(B_\mathfrak q) \geq 2$
(Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}).
Thus the functor is fully faithful by
Lemma \ref{lemma-quasi-compact-dense-open-connected-at-infinity-Noetherian}
combined with Local Cohomology,
Lemma \ref{local-cohomology-lemma-depth-2-connected-punctured-spectrum}.

\medskip\noindent
Denote $A^\wedge$ and $B^\wedge$ the completions of $A$ and $B$
with respect to their maximal ideals. Observe that the assumptions
of the proposition hold for $A^\wedge \to B^\wedge$, see
More on Algebra, Lemmas
\ref{more-algebra-lemma-completion-dimension},
\ref{more-algebra-lemma-completion-depth}, and
\ref{more-algebra-lemma-formally-smooth-completion}.
By the uniqueness and compatibility with flat base change
of the construction of  Lemma \ref{lemma-extend-S2}
it suffices to prove the essential surjectivity for
$A^\wedge \to B^\wedge$ and the inverse image of $V$
(details omitted; compare with Lemma \ref{lemma-purity-and-completion}
for the case where $V$ is the punctured spectrum).
By More on Algebra, Proposition \ref{more-algebra-proposition-fs-regular}
this means we may assume $A \to B$ is regular.

\medskip\noindent
Let $W \to V$ be a finite \'etale morphism.
By Popescu's theorem
(Smoothing Ring Maps, Theorem \ref{smoothing-theorem-popescu})
we can write $B = \colim B_i$ as a filtered colimit
of smooth $A$-algebras. We can pick an $i$ and an
open $V_i \subset \Spec(B_i)$ whose inverse image is $V$
(Limits, Lemma \ref{limits-lemma-descend-opens}).
After increasing $i$ we may assume there is a finite
\'etale morphism $W_i \to V_i$ whose base change to $V$
is $W \to V$, see
Limits, Lemmas \ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-finite-finite-presentation}, and
\ref{limits-lemma-descend-etale}.
We may assume the complement of $V_i$ is contained
in the closed fibre of $\Spec(B_i) \to \Spec(A)$ as this
is true for $V$ (either choose $V_i$ this way or use
the lemma above to show this is true for $i$ large enough).
Let $\eta$ be the generic point of the closed fibre
of $\Spec(B) \to \Spec(A)$. Since $\eta \in V$, the image of
$\eta$ is in $V_i$. Hence after replacing $V_i$ by an
affine open neighbourhood of the image of the closed point
of $\Spec(B)$, we may assume that the closed fibre
of $\Spec(B_i) \to \Spec(A)$ is irreducible and that
its generic point is contained in $V_i$ (details omitted; use that
a scheme smooth over a field is a disjoint union of irreducible schemes).
At this point we may apply Lemma \ref{lemma-purity-smooth-over-depth2}
to see that $W_i \to V_i$ extends to a finite \'etale
morphism $\Spec(C_i) \to \Spec(B_i)$ and pulling
back to $\Spec(B)$ we conclude that $W$ is in
the essential image of the functor
$\textit{F\'Et}_Y \to \textit{F\'Et}_V$
as desired.
\end{proof}





\section{Lefschetz for the fundamental group}
\label{section-global-lefschetz}

\noindent
Of course we have already proven a bunch of results of this type
in the local case. In this section we discuss the projective case.

\begin{proposition}
\label{proposition-lefschetz-fully-faithful}
Let $k$ be a field. Let $X$ be a proper scheme over $k$.
Let $\mathcal{L}$ be an ample invertible $\mathcal{O}_X$-module.
Let $s \in \Gamma(X, \mathcal{L})$. Let $Y = Z(s)$ be the
zero scheme of $s$. Assume that for all $x \in X \setminus Y$
we have
$$
\text{depth}(\mathcal{O}_{X, x}) + \dim(\overline{\{x\}}) > 1
$$
Then the restriction functor $\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is fully faithful. In fact, for any open subscheme $V \subset X$
containing $Y$ the restriction functor
$\textit{F\'Et}_V \to \textit{F\'Et}_Y$
is fully faithful. 
\end{proposition}

\begin{proof}
The first statement is a formal consequence of
Lemma \ref{lemma-restriction-fully-faithful-special}
and
Algebraic and Formal Geometry, Proposition
\ref{algebraization-proposition-lefschetz}.
The second statement follows from
Lemma \ref{lemma-restriction-fully-faithful-special}
and
Algebraic and Formal Geometry, Lemma
\ref{algebraization-lemma-lefschetz-addendum}.
\end{proof}

\begin{proposition}
\label{proposition-lefschetz-equivalence-general}
Let $k$ be a field. Let $X$ be a proper scheme over $k$.
Let $\mathcal{L}$ be an ample invertible $\mathcal{O}_X$-module.
Let $s \in \Gamma(X, \mathcal{L})$. Let $Y = Z(s)$ be the
zero scheme of $s$. Let $\mathcal{V}$ be the set of open
subschemes of $X$ containing $Y$ ordered by reverse inclusion.
Assume that for all $x \in X \setminus Y$ we have
$$
\text{depth}(\mathcal{O}_{X, x}) + \dim(\overline{\{x\}}) > 2
$$
Then the restriction functor
$$
\colim_\mathcal{V} \textit{F\'Et}_V \to \textit{F\'Et}_Y
$$
is an equivalence.
\end{proposition}

\begin{proof}
This is a formal consequence of
Lemma \ref{lemma-restriction-equivalence-general} and
Algebraic and Formal Geometry, Proposition
\ref{algebraization-proposition-lefschetz-equivalence}.
\end{proof}

\begin{proposition}
\label{proposition-lefschetz-equivalence}
Let $k$ be a field. Let $X$ be a proper scheme over $k$.
Let $\mathcal{L}$ be an ample invertible $\mathcal{O}_X$-module.
Let $s \in \Gamma(X, \mathcal{L})$. Let $Y = Z(s)$ be the
zero scheme of $s$.
Assume that for all $x \in X \setminus Y$ we have
$$
\text{depth}(\mathcal{O}_{X, x}) + \dim(\overline{\{x\}}) > 2
$$
and that for $x \in X \setminus Y$ closed purity holds for
$\mathcal{O}_{X, x}$. Then the restriction functor
$\textit{F\'Et}_X \to \textit{F\'Et}_Y$
is an equivalence. If $X$ or equivalently $Y$ is connected, then
$$
\pi_1(Y, \overline{y}) \to \pi_1(X, \overline{y})
$$
is an isomorphism for any geometric point $\overline{y}$ of $Y$.
\end{proposition}

\begin{proof}
Fully faithfulness holds by
Proposition \ref{proposition-lefschetz-fully-faithful}.
By Proposition \ref{proposition-lefschetz-equivalence-general}
any object of $\textit{F\'Et}_Y$
is isomorphic to the fibre product $U \times_V Y$ for some
finite \'etale morphism $U \to V$ where $V \subset X$
is an open subscheme containing $Y$.
The complement $T = X \setminus V$
is\footnote{Namely, $T$ is proper over $k$ (being closed in $X$)
and affine (being closed in the affine scheme $X \setminus Y$, see
Morphisms, Lemma \ref{morphisms-lemma-proper-ample-delete-affine})
and hence finite over $k$
(Morphisms, Lemma \ref{morphisms-lemma-finite-proper}).
Thus $T$ is a finite set of closed points.}
a finite set of closed points of $X \setminus Y$.
Say $T = \{x_1, \ldots, x_n\}$.
By assumption we can find finite \'etale morphisms
$V'_i \to \Spec(\mathcal{O}_{X, x_i})$ agreeing with
$U \to V$ over $V \times_X \Spec(\mathcal{O}_{X, x_i})$.
By Limits, Lemma \ref{limits-lemma-glueing-near-closed-point}
applied $n$ times we see that $U \to V$ extends to a finite \'etale
morphism $U' \to X$ as desired.
See Lemma \ref{lemma-what-equivalence-gives} for the final statement.
\end{proof}










\section{Purity of ramification locus}
\label{section-purity-ramification}

\noindent
In this section we discuss the analogue of purity of branch locus for
generically finite morphisms. Apparently, this result is due to Gabber.
A special case is van der Waerden's purity theorem for the locus where
a birational morphism from a normal variety to a smooth variety is not
an isomorphism.

\begin{lemma}
\label{lemma-characterize-rational-singularity}
Let $A$ be a Noetherian normal local domain of dimension $2$.
Assume $A$ is Nagata, has a dualizing module $\omega_A$, and has a
resolution of singularities $f : X \to \Spec(A)$.
Let $\omega_X$ be as in Resolution of Surfaces,
Remark \ref{resolve-remark-dualizing-setup}.
If $\omega_X \cong \mathcal{O}_X(E)$ for some effective
Cartier divisor $E \subset X$ supported on the exceptional
fibre, then $A$ defines a rational singularity.
If $f$ is a minimal resolution, then $E = 0$.
\end{lemma}

\begin{proof}
There is a trace map $Rf_*\omega_X \to \omega_A$, see
Duality for Schemes, Section \ref{duality-section-trace}.
By Grauert-Riemenschneider
(Resolution of Surfaces,
Proposition \ref{resolve-proposition-Grauert-Riemenschneider})
we have $R^1f_*\omega_X = 0$.
Thus the trace map is a map $f_*\omega_X \to \omega_A$.
Then we can consider
$$
\mathcal{O}_{\Spec(A)} = f_*\mathcal{O}_X \to f_*\omega_X \to \omega_A
$$
where the first map comes from the map
$\mathcal{O}_X \to \mathcal{O}_X(E) = \omega_X$ which is
assumed to exist in the statement of the lemma.
The composition is an isomorphism by Divisors, Lemma
\ref{divisors-lemma-check-isomorphism-via-depth-and-ass}
as it is an isomorphism over the punctured spectrum of $A$
(by the assumption in the lemma and the fact that $f$ is an isomorphism
over the punctured spectrum) and $A$ and $\omega_A$
are $A$-modules of depth $2$ (by
Algebra, Lemma \ref{algebra-lemma-criterion-normal} and
Dualizing Complexes, Lemma \ref{dualizing-lemma-depth-dualizing-module}).
Hence $f_*\omega_X \to \omega_A$ is surjective whence an isomorphism.
Thus $Rf_*\omega_X = \omega_A$ which by duality implies
$Rf_*\mathcal{O}_X = \mathcal{O}_{\Spec(A)}$.
Whence $H^1(X, \mathcal{O}_X) = 0$ which implies that $A$
defines a rational singularity (see discussion in
Resolution of Surfaces, Section
\ref{resolve-section-bounded} in particular
Lemmas \ref{resolve-lemma-regular-rational} and
\ref{resolve-lemma-exact-sequence}).
If $f$ is minimal, then $E = 0$ because the map
$f^*\omega_A \to \omega_X$ is surjective by
a repeated application of Resolution of Surfaces, Lemma
\ref{resolve-lemma-dualizing-blow-up-rational}
and $\omega_A \cong A$ as we've seen above.
\end{proof}

\begin{lemma}
\label{lemma-key-purity-ramification}
Let $f : X \to \Spec(A)$ be a finite type morphism.
Let $x \in X$ be a point. Assume
\begin{enumerate}
\item $A$ is an excellent regular local ring,
\item $\mathcal{O}_{X, x}$ is normal of dimension $2$,
\item $f$ is \'etale outside of $\overline{\{x\}}$.
\end{enumerate}
Then $f$ is \'etale at $x$.
\end{lemma}

\begin{proof}
We first replace $X$ by an affine open neighbourhood of $x$.
Observe that $\mathcal{O}_{X, x}$ is an excellent local ring
(More on Algebra, Lemma \ref{more-algebra-lemma-finite-type-over-excellent}).
Thus we can choose a minimal resolution of singularities
$W \to \Spec(\mathcal{O}_{X, x})$, see
Resolution of Surfaces, Theorem \ref{resolve-theorem-resolve}.
After possibly replacing $X$ by an affine open neighbourhood of $x$
we can find a proper morphism $b : X' \to X$ such that
$X' \times_X \Spec(\mathcal{O}_{X, x}) = W$, see
Limits, Lemma \ref{limits-lemma-glueing-near-closed-point}.
After shrinking $X$ further, we may assume $X'$ is regular.
Namely, we know $W$ is regular and $X'$ is excellent
and the regular locus of the spectrum of an excellent ring is open.
Since $W \to \Spec(\mathcal{O}_{X, x})$ is projective
(as a sequence of normalized blowing ups), we may assume
after shrinking $X$ that $b$ is projective (details omitted).
Let $U = X \setminus \overline{\{x\}}$.
Since $W \to \Spec(\mathcal{O}_{X, x})$ is an isomorphism over the
punctured spectrum, we may assume $b : X' \to X$ is an isomorphism over $U$.
Thus we may and will think of $U$ as an open subscheme of $X'$ as well.
Set $f' = f \circ b : X' \to \Spec(A)$.

\medskip\noindent
Since $A$ is regular we see that $\mathcal{O}_Y$ is a dualizing complex for $Y$.
Hence $f^!\mathcal{O}_Y$ is a dualzing complex on $X$
(Duality for Schemes, Lemma \ref{duality-lemma-shriek-dualizing}).
The Cohen-Macaulay locus of $X$ is open by
Duality for Schemes, Lemma \ref{duality-lemma-dualizing-module-CM-scheme}
(this can also be proven using excellency).
Since $\mathcal{O}_{X, x}$ is Cohen-Macaulay, after shrinking
$X$ we may assume $X$ is Cohen-Macaulay.
Observe that an \'etale morphism is a local complete intersection.
Thus
Duality for Schemes, Lemma \ref{duality-lemma-fundamental-class-almost-lci}
applies with $r = 0$ and we get a map
$$
\mathcal{O}_X \longrightarrow \omega_{X/Y} = H^0(f^!\mathcal{O}_Y)
$$
which is an isomorphism over $X \setminus \overline{\{x\}}$.
Since $\omega_{X/Y}$ is $(S_2)$ by
Duality for Schemes, Lemma \ref{duality-lemma-shriek-over-CM}
we find this map is an isomorphism by
Divisors, Lemma \ref{divisors-lemma-check-isomorphism-via-depth-and-ass}.
This already shows that $X$ and in particular $\mathcal{O}_{X, x}$ is
Gorenstein.

\medskip\noindent
Set $\omega_{X'/Y} = H^0((f')^!\mathcal{O}_Y)$. Arguing in exactly the
same manner as above we find that $(f')^!\mathcal{O}_Y = \omega_{X'/Y}[0]$
is a dualizing complex for $X'$. Since $X'$ is regular
the morphism $X' \to Y$ is a local complete intersection morphism, see
More on Morphisms, Lemma
\ref{more-morphisms-lemma-morphism-regular-schemes-is-lci}.
By Duality for Schemes, Lemma \ref{duality-lemma-fundamental-class-lci}
there exists a map
$$
\mathcal{O}_{X'} \longrightarrow \omega_{X'/Y}
$$
which is an isomorphism over $U$. We conclude
$\omega_{X'/Y} = \mathcal{O}_{X'}(E)$ for some effective
Cartier divisor $E \subset X'$ disjoint from $U$.

\medskip\noindent
Since $\omega_{X/Y} = \mathcal{O}_Y$ we see that
$\omega_{X'/Y} = b^! f^!\mathcal{O}_Y = b^!\mathcal{O}_X$.
Returning to $W \to \Spec(\mathcal{O}_{X, x})$
we see that $\omega_W = \mathcal{O}_W(E|_W)$.
By Lemma \ref{lemma-characterize-rational-singularity}
we find $E|_W = 0$.
This means that $f' : X' \to Y$ is \'etale by (the already used)
Duality for Schemes, Lemma \ref{duality-lemma-fundamental-class-lci}.
This immediately finishes the proof, as \'etaleness
of $f'$ forces $b$ to be an isomorphism.
\end{proof}

\begin{lemma}[Purity of ramification locus]
\label{lemma-purity-ramification}
\begin{reference}
This result for complex spaces can be found on page 170 of \cite{Fischer}.
In general this is \cite[Theorem 2.4]{Zong} attributed to Gabber.
\end{reference}
Let $f : X \to Y$ be a morphism of locally Noetherian schemes.
Let $x \in X$ and set $y = f(x)$. Assume
\begin{enumerate}
\item $\mathcal{O}_{X, x}$ is normal of dimension $\geq 1$,
\item $\mathcal{O}_{Y, y}$ is regular,
\item $f$ is locally of finite type, and
\item for specializations $x' \leadsto x$ with
$\dim(\mathcal{O}_{X, x'}) = 1$ our $f$ is \'etale at $x'$.
\end{enumerate}
Then $f$ is \'etale at $x$.
\end{lemma}

\begin{proof}
We will prove the lemma by induction on $d = \dim(\mathcal{O}_{X, x})$.

\medskip\noindent
An uninteresting case is $d = 1$ since in that case the morphism
$f$ is \'etale at $x$ by assumption. Assume $d \geq 2$.

\medskip\noindent
We can base change by $\Spec(\mathcal{O}_{Y, y}) \to Y$
without affecting the conclusion of the lemma, see
Morphisms, Lemma \ref{morphisms-lemma-set-points-where-fibres-etale}.
Thus we may assume $Y = \Spec(A)$ where $A$ is a regular local
ring and $y$ corresponds to the maximal ideal $\mathfrak m$ of $A$.

\medskip\noindent
Let $x' \leadsto x$ be a specialization with $x' \not = x$.
Then $\mathcal{O}_{X, x'}$ is normal as a localization of
$\mathcal{O}_{X, x}$. If $x'$ is not a generic point of $X$,
then $1 \leq \dim(\mathcal{O}_{X, x'}) < d$ and we conclude that
$f$ is \'etale at $x'$ by induction hypothesis.
Thus we may assume that $f$ is \'etale at all points specializing to
$x$. Since the set of points where $f$ is \'etale is open in $X$
(by definition) we may after replacing $X$ by an open neighbourhood of $x$
assume that $f$ is \'etale away from $\overline{\{x\}}$.
In particular, we see that $f$ is \'etale except at points
lying over the closed point $y \in Y = \Spec(A)$.

\medskip\noindent
Let $X' = X \times_{\Spec(A)} \Spec(A^\wedge)$. Let $x' \in X'$
be the unique point lying over $x$. By the above we see that
$X'$ is \'etale over $\Spec(A^\wedge)$ away from the closed fibre and
hence $X'$ is normal away from the closed fibre. Since $X$ is normal
we conclude that $X'$ is normal by
Resolution of Surfaces, Lemma \ref{resolve-lemma-normalization-completion}.
Then if we can show $X' \to \Spec(A^\wedge)$ is \'etale at $x'$,
then $f$ is \'etale at $x$ (by the aforementioned
Morphisms, Lemma \ref{morphisms-lemma-set-points-where-fibres-etale}).
Thus we may and do assume $A$ is a regular complete local ring.

\medskip\noindent
The case $d = 2$ now follows from Lemma \ref{lemma-key-purity-ramification}.

\medskip\noindent
Assume $d > 2$. Let $t \in \mathfrak m$, $t \not \in \mathfrak m^2$.
Set $Y_0 = \Spec(A/tA)$ and $X_0 = X \times_Y Y_0$.
Then $X_0 \to Y_0$ is \'etale away from the fibre over the closed point.
Since $d > 2$ we have $\dim(\mathcal{O}_{X_0, x}) = d - 1$ is $\geq 2$.
The normalization $X_0' \to X_0$ is surjective and finite
(as we're working over a complete local ring and such rings are Nagata).
Let $x' \in X_0'$ be a point mapping to $x$. By induction hypothesis the
morphism $X'_0 \to Y$ is \'etale at $x'$. From the inclusions
$\kappa(y) \subset \kappa(x) \subset \kappa(x')$
we conclude that $\kappa(x)$ is finite over $\kappa(y)$.
Hence $x$ is a closed point of the fibre of $X \to Y$
over $y$. But since $x$ is also a generic point of
this fibre, we conclude that $f$ is quasi-finite at $x$
and we reduce to the case of purity of branch locus, see
Lemma \ref{lemma-purity}.
\end{proof}




\section{Affineness of complement of ramification locus}
\label{section-stronger-purity}

\noindent
Let $f : X \to Y$ be a finite type morphism of Noetherian schemes
with $X$ normal and $Y$ regular. Let $V \subset X$ be the maximal
open subscheme where $f$ is \'etale.
The discussion in \cite[Chapter IV, Section 21.12]{EGA}
suggests that $V \to X$ might be an affine morphism.
Observe that if $V \to X$ is affine, then we deduce purity of
ramification locus (Lemma \ref{lemma-purity-ramification}) by
using Divisors, Lemma \ref{divisors-lemma-complement-affine-open-immersion}.
Thus affineness of $V \to X$ is a ``strong'' form of purity
for the ramification locus.
In this section we prove $V \to X$ is affine when
$X$ and $Y$ are equicharacteristic and excellent, see
Theorem \ref{theorem-global}. It seems reasonable
to guess the result remains true for $X$ and $Y$
of mixed characteristic (but still excellent).

\begin{lemma}
\label{lemma-structure-cohomology}
Let $(A, \mathfrak m)$ be a regular local ring which contains a field.
Let $f : V \to \Spec(A)$ be \'etale and quasi-compact.
Assume that $\mathfrak m \not \in f(V)$ and assume that
$g : V \to \Spec(A) \setminus \{\mathfrak m\}$ is affine.
Then $H^i(V, \mathcal{O}_V)$, $i > 0$ is isomorphic to a direct
sum of copies of the injective hull of the residue field of $A$.
\end{lemma}

\begin{proof}
Denote $U = \Spec(A) \setminus \{\mathfrak m\}$ the punctured spectrum.
Thus $g : V \to U$ is affine.
We have $H^i(V, \mathcal{O}_V) = H^i(U, g_*\mathcal{O}_V)$ by
Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}.
The $\mathcal{O}_U$-module $g_*\mathcal{O}_V$ is quasi-coherent by
Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}.
For any quasi-coherent $\mathcal{O}_U$-module $\mathcal{F}$
the cohomology $H^i(U, \mathcal{F})$, $i > 0$
is $\mathfrak m$-power torsion, see for example
Local Cohomology, Lemma \ref{local-cohomology-lemma-local-cohomology}.
In particular, the $A$-modules $H^i(V, \mathcal{O}_V)$, $i > 0$
are $\mathfrak m$-power torsion.
For any flat ring map $A \to A'$ we have
$H^i(V, \mathcal{O}_V) \otimes_A A' = H^i(V', \mathcal{O}_{V'})$
where $V' = V \times_{\Spec(A)} \Spec(A')$ by flat base change
Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}.
If we take $A'$ to be the completion of $A$ (flat by
More on Algebra, Section \ref{more-algebra-section-permanence-completion}),
then we see that
$$
H^i(V, \mathcal{O}_V) = H^i(V, \mathcal{O}_V) \otimes_A A' =
H^i(V', \mathcal{O}_{V'}),\quad\text{for } i > 0
$$
The first equality by the torsion property we just proved and
More on Algebra, Lemma \ref{more-algebra-lemma-neighbourhood-equivalence}.
Moreover, the injective hull of the residue field $k$
is the same for $A$ and $A'$, see
Dualizing Complexes, Lemma \ref{dualizing-lemma-compare}.
In this way we reduce to the case $A = k[[x_1, \ldots, x_d]]$, see
Algebra, Section \ref{algebra-section-cohen-structure-theorem}.

\medskip\noindent
Assume the characteristic of $k$ is $p > 0$. Since $F : A \to A$,
$a \mapsto a^p$ is flat (Local Cohomology, Lemma
\ref{local-cohomology-lemma-frobenius-flat-regular})
and since $V \times_{\Spec(A), \Spec(F)} \Spec(A) \cong V$ as schemes
over $\Spec(A)$ by
\'Etale Morphisms, Lemma \ref{etale-lemma-relative-frobenius-etale}
the above gives
$H^i(V, \mathcal{O}_V) \otimes_{A, F} A \cong H^i(V, \mathcal{O}_V)$.
Thus we get the result by
Local Cohomology, Lemma
\ref{local-cohomology-lemma-structure-torsion-Frobenius-regular}.

\medskip\noindent
Assume the characteristic of $k$ is $0$. By
Local Cohomology, Lemma \ref{local-cohomology-lemma-etale-derivation}
there are additive operators $D_j$, $j = 1, \ldots, d$ on
$H^i(V, \mathcal{O}_V)$ satisfying the Leibniz rule with
respect to $\partial_j = \partial/\partial x_j$.
Thus we get the result by
Local Cohomology,
Lemma \ref{local-cohomology-lemma-structure-torsion-D-module-regular}.
\end{proof}

\begin{lemma}
\label{lemma-conclude}
In the situation of Lemma \ref{lemma-structure-cohomology}
assume that $H^i(V, \mathcal{O}_V) = 0$ for $i \geq \dim(A) - 1$.
Then $V$ is affine.
\end{lemma}

\begin{proof}
Let $k = A/\mathfrak m$. Since $V \times_{\Spec(A)} \Spec(k) = \emptyset$,
by cohomology and base change we have
$$
R\Gamma(V, \mathcal{O}_V) \otimes_A^\mathbf{L} k = 0
$$
See
Derived Categories of Schemes, Lemma \ref{perfect-lemma-compare-base-change}.
Thus there is a spectral sequence
(More on Algebra, Example \ref{more-algebra-example-tor})
$$
E_2^{p, q} = \text{Tor}_{-p}(k, H^q(V, \mathcal{O}_V)),\quad
d_2^{p, q} : E_2^{p, q} \to E_2^{p + 2, q - 1}
$$
and $d_r^{p, q} : E_r^{p, q} \to E_r^{p + r, q - r + 1}$
converging to zero. By Lemma \ref{lemma-structure-cohomology},
Dualizing Complexes, Lemma \ref{dualizing-lemma-tor-injective-hull},
and our assumption $H^i(V, \mathcal{O}_V) = 0$ for $i \geq \dim(A) - 1$
we conclude that there is no nonzero differential
entering or leaving the $(p, q) = (0, 0)$ spot. Thus
$H^0(V, \mathcal{O}_V) \otimes_A k = 0$. This means that
if $\mathfrak m = (x_1, \ldots, x_d)$ then we have
an open covering $V = \bigcup V \times_{\Spec(A)} \Spec(A_{x_i})$
by affine open subschemes $V \times_{\Spec(A)} \Spec(A_{x_i})$
(because $V$ is affine over the punctured spectrum of $A$)
such that $x_1, \ldots, x_d$ generate
the unit ideal in $\Gamma(V, \mathcal{O}_V)$.
This implies $V$ is affine by
Properties, Lemma \ref{properties-lemma-characterize-affine}.
\end{proof}

\begin{theorem}
\label{theorem-global}
Let $Y$ be an excellent regular scheme over a field. Let $f : X \to Y$
be a finite type morphism of schemes with $X$ normal. Let $V \subset X$
be the maximal open subscheme where $f$ is \'etale. Then the inclusion
morphism $V \to X$ is affine.
\end{theorem}

\begin{proof}
Let $x \in X$ with image $y \in Y$. It suffices to prove that
$V \cap W$ is affine for some affine open neighbourhood $W$ of $x$.
Since $\Spec(\mathcal{O}_{X, x})$ is the limit of the schemes $W$,
this holds if and only if
$$
V_x = V \times_X \Spec(\mathcal{O}_{X, x})
$$
is affine (Limits, Lemma \ref{limits-lemma-limit-affine}).
Thus, if the theorem holds for the morphism
$X \times_Y \Spec(\mathcal{O}_{Y, y}) \to \Spec(\mathcal{O}_{Y, y})$,
then the theorem holds. In particular, we may assume $Y$
is regular of finite dimension, which allows us to do induction
on the dimension $d = \dim(Y)$. Combining this with the same argument again,
we may assume that $Y$ is local with closed point $y$ and that
$V \cap (X \setminus f^{-1}(\{y\}) \to X \setminus f^{-1}(\{y\})$
is affine.

\medskip\noindent
Let $x \in X$ be a point lying over $y$. If $x \in V$, then
there is nothing to prove. Observe that  $f^{-1}(\{y\}) \cap V$
is a finite set of closed points (the fibres of an \'etale morphism
are discrete). Thus after replacing $X$
by an affine open neighbourhood of $x$ we may assume
$y \not \in f(V)$. We have to prove that $V$ is affine.

\medskip\noindent
Let $e(V)$ be the maximum $i$ with $H^i(V, \mathcal{O}_V) \not = 0$.
As $X$ is affine the integer $e(V)$ is the maximum of the numbers $e(V_x)$
where $x \in X \setminus V$, see
Local Cohomology, Lemma \ref{local-cohomology-lemma-cd-local}
and the characterization of cohomological dimension
in Local Cohomology, Lemma \ref{local-cohomology-lemma-cd}.
We have $e(V_x) \leq \dim(\mathcal{O}_{X, x}) - 1$ by
Local Cohomology, Lemma \ref{local-cohomology-lemma-cd-dimension}.
If $\dim(\mathcal{O}_{X, x}) \geq 2$ then purity of
ramification locus (Lemma \ref{lemma-purity-ramification})
shows that $V_x$ is strictly smaller than the punctured spectrum of
$\mathcal{O}_{X, x}$. Since $\mathcal{O}_{X, x}$ is
normal and excellent, this implies
$e(V_x) \leq \dim(\mathcal{O}_{X, x}) - 2$ by
Hartshorne-Lichtenbaum vanishing
(Local Cohomology, Lemma \ref{local-cohomology-lemma-affine-complement}).
On the other hand, since $X \to Y$ is of finite type
and $V \subset X$ is dense (after possibly replacing $X$
by the closure of $V$), we see that $\dim(\mathcal{O}_{X, x}) \leq d$
by the dimension formula
(Morphisms, Lemma \ref{morphisms-lemma-dimension-formula}).
Whence $e(V) \leq \max(0, d -  2)$.
Thus $V$ is affine by Lemma \ref{lemma-conclude}
if $d \geq 2$. If $d = 1$ or $d = 0$, then the punctured spectrum of
$\mathcal{O}_{Y, y}$ is affine and hence $V$ is affine.
\end{proof}




\section{Specialization maps in the smooth proper case}
\label{section-specialization-smooth-proper}

\noindent
In this section we discuss the following result.
Let $f : X \to S$ be a proper smooth morphism of schemes.
Let $s \leadsto s'$ be a specialization of points in $S$.
Then the specialization map
$$
sp : \pi_1(X_{\overline{s}}) \longrightarrow \pi_1(X_{\overline{s}'})
$$
of Section \ref{section-specialization-map}
is surjective and
\begin{enumerate}
\item if the characteristic of $\kappa(s')$ is zero, then it is
an isomorphism, or
\item if the characteristic of $\kappa(s')$ is $p > 0$, then it
induces an isomorphism on maximal prime-to-$p$ quotients.
\end{enumerate}

\begin{lemma}
\label{lemma-specialization-map-surjective}
Let $f : X \to S$ be a flat proper morphism with geometrically
connected fibres. Let $s' \leadsto s$ be a specialization.
If $X_s$ is geometrically reduced, then the specialization
map $sp : \pi_1(X_{\overline{s}'}) \to \pi_1(X_{\overline{s}})$
is surjective.
\end{lemma}

\begin{proof}
Since $X_s$ is geometrically reduced, we may assume all
fibres are geometrically reduced after possibly shrinking $S$, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-geometrically-reduced-open}.
Let $\mathcal{O}_{S, s} \to A \to \kappa(\overline{s}')$ be as
in the construction of the specialization map, see
Section \ref{section-specialization-map}.
Thus it suffices to show that
$$
\pi_1(X_{\overline{s}'}) \to \pi_1(X_A)
$$
is surjective. This follows from
Proposition \ref{proposition-first-homotopy-sequence}
and $\pi_1(\Spec(A)) = \{1\}$.
\end{proof}

\begin{proposition}
\label{proposition-specialization-map-isomorphism}
Let $f : X \to S$ be a smooth proper morphism with geometrically
connected fibres. Let $s' \leadsto s$ be a specialization.
If the characteristic to $\kappa(s)$ is zero, then the specialization
map
$$
sp : \pi_1(X_{\overline{s}'}) \to \pi_1(X_{\overline{s}})
$$
is an isomorphism.
\end{proposition}

\begin{proof}
The map is surjective by
Lemma \ref{lemma-specialization-map-surjective}.
Thus we have to show it is injective.

\medskip\noindent
We may assume $S$ is affine. Then $S$ is a cofiltered limit of affine
schemes of finite type over $\mathbf{Z}$.
Hence we can assume $X \to S$ is the
base change of $X_0 \to S_0$ where $S_0$ is the spectrum of a finite
type $\mathbf{Z}$-algebra and $X_0 \to S_0$ is smooth and proper.
See Limits, Lemma \ref{limits-lemma-descend-finite-presentation},
\ref{limits-lemma-descend-smooth}, and
\ref{limits-lemma-eventually-proper}. By
Lemma \ref{lemma-specialization-map-base-change}
we reduce to the case where the base is Noetherian.

\medskip\noindent
Applying Lemma \ref{lemma-specialization-map-discrete-valuation-ring}
we reduce to the case where the base $S$ is the spectrum of a
strictly henselian discrete valuation ring $A$ and we are
looking at the specialization map over $A$.
Let $K$ be the fraction field of $A$.
Choose an algebraic closure $\overline{K}$ which
corresponds to a geometric generic point $\overline{\eta}$ of $\Spec(A)$.
For $\overline{K}/L/K$ finite separable, let $B \subset L$ be the
integral closure of $A$ in $L$. This is a discrete
valuation ring by
More on Algebra, Remark \ref{more-algebra-remark-finite-separable-extension}.

\medskip\noindent
Let $X \to \Spec(A)$ be as in the previous paragraph.
To show injectivity of the specialization map
it suffices to prove that every finite
\'etale cover $V$ of $X_{\overline{\eta}}$ is the base
change of a finite \'etale cover $Y \to X$.
Namely, then $\pi_1(X_{\overline{\eta}}) \to \pi_1(X) = \pi_1(X_s)$
is injective by Lemma \ref{lemma-functoriality-galois-injective}.

\medskip\noindent
Given $V$ we can first descend $V$ to $V' \to X_{K^{sep}}$ by
Lemma \ref{lemma-perfection} and then to
$V'' \to X_L$ by Lemma \ref{lemma-limit}.
Let $Z \to X_B$ be the normalization of $X_B$ in $V''$.
Observe that $Z$ is normal and that $Z_L = V''$ as schemes
over $X_L$. Hence $Z \to X_B$ is finite \'etale over
the generic fibre. The problem is that we do not know that
$Z \to X_B$ is everywhere \'etale. Since $X \to \Spec(A)$
has geometrically connected smooth fibres, we see that
the special fibre $X_s$ is geometrically irreducible.
Hence the special fibre of $X_B \to \Spec(B)$ is irreducible;
let $\xi_B$ be its generic point. Let
$\xi_1, \ldots, \xi_r$ be the points of $Z$ mapping to
$\xi_B$. Our first (and it will turn out only) problem
is now that the extensions
$$
\mathcal{O}_{X_B, \xi_B} \subset \mathcal{O}_{Z, \xi_i}
$$
of discrete valuation rings may be ramified. Let $e_i$ be
the ramification index of this extension. Note that since the
characteristic of $\kappa(s)$ is zero, the ramification is tame!

\medskip\noindent
To get rid of the ramification we are going to choose a further finite
separable extension $K^{sep}/L'/L/K$ such that the ramification
index $e$ of the induced extensions $B'/B$ is divisible by $e_i$.
Consider the normalized base change $Z'$ of $Z$ with respect to
$\Spec(B') \to \Spec(B)$, see discussion in
More on Morphisms, Section \ref{more-morphisms-section-reduced-fibre-theorem}.
Let $\xi_{i, j}$ be the points of $Z'$ mapping to $\xi_{B'}$
and to $\xi_i$ in $Z$. Then the local rings
$$
\mathcal{O}_{Z', \xi_{i, j}}
$$
are localizations of the integral closure of $\mathcal{O}_{Z, \xi_i}$
in $L' \otimes_L F_i$ where $F_i$ is the fraction field of
$\mathcal{O}_{Z, \xi_i}$; details omitted. Hence Abhyankar's lemma
(More on Algebra, Lemma \ref{more-algebra-lemma-abhyankar})
tells us that
$$
\mathcal{O}_{X_{B'}, \xi_{B'}} \subset \mathcal{O}_{Z', \xi_{i, j}}
$$
is unramified. We conclude that the morphism $Z' \to X_{B'}$
is \'etale away from codimension $1$. Hence by purity of
branch locus (Lemma \ref{lemma-purity})
we see that $Z' \to X_{B'}$ is finite \'etale!

\medskip\noindent
However, since the residue field extension induced by $A \to B'$
is trivial (as the residue field of $A$ is algebraically closed
being separably closed of characteristic zero)
we conclude that $Z'$ is the base change of a finite \'etale
cover $Y \to X$ by applying
Lemma \ref{lemma-finite-etale-on-proper-over-henselian}
twice (first to get $Y$ over $A$, then to prove that
the pullback to $B$ is isomorphic to $Z'$).
This finishes the proof.
\end{proof}

\noindent
Let $G$ be a profinite group. Let $p$ be a prime number.
The {\it maximal prime-to-$p$ quotient} is by definition
$$
G' = \lim_{U \subset G\text{ open, normal, index prime to }p} G/U
$$
If $X$ is a connected scheme and $p$ is given, then the maximal
prime-to-$p$ quotient of $\pi_1(X)$ is denoted $\pi'_1(X)$.

\begin{theorem}
\label{theorem-specialization-map-isomorphism-prime-to-p}
Let $f : X \to S$ be a smooth proper morphism with geometrically
connected fibres. Let $s' \leadsto s$ be a specialization.
If the characteristic of $\kappa(s)$ is $p$, then the specialization
map
$$
sp : \pi_1(X_{\overline{s}'}) \to \pi_1(X_{\overline{s}})
$$
is surjective and induces an isomorphism
$$
\pi'_1(X_{\overline{s}'}) \cong \pi'_1(X_{\overline{s}})
$$
of the maximal prime-to-p quotients
\end{theorem}

\begin{proof}
This is proved in exactly the same manner as
Proposition \ref{proposition-specialization-map-isomorphism}
with the following differences
\begin{enumerate}
\item Given $X/A$ we no longer show that the functor
$\textit{F\'Et}_X \to \textit{F\'Et}_{X_{\overline{\eta}}}$
is essentially surjective. We show only that Galois objects
whose Galois group has order prime to $p$ are in the essential
image. This will be enough to conclude the injectivity of
$\pi'_1(X_{\overline{s}'}) \to \pi'_1(X_{\overline{s}})$ by
exactly the same argument.
\item The extensions
$\mathcal{O}_{X_B, \xi_B} \subset \mathcal{O}_{Z, \xi_i}$
are tamely ramified as the associated extension of fraction
fields is Galois with group of order prime to $p$. See
More on Algebra, Lemma \ref{more-algebra-lemma-galois-conclusion}.
\item The extension $\kappa_B/\kappa_A$ is no longer
necessarily trivial, but it is purely inseparable.
Hence the morphism $X_{\kappa_B} \to X_{\kappa_A}$
is a universal homeomorphism and induces an isomorphism
of fundamental groups by Proposition \ref{proposition-universal-homeomorphism}.
\end{enumerate}
\end{proof}













\section{Tame ramification}
\label{section-tame}

\noindent
Let $X \to Y$ be a finite \'etale morphism of schemes of finite type
over $\mathbf{Z}$. There are many ways to define what it means for $f$
to be tamely ramified at $\infty$. The article \cite{Kerz-Schmidt}
discusses to what extent these notions agree.

\medskip\noindent
In this section we discuss a different more elementary question which
precedes the notion of tameness at infinity.
Please compare with the (slightly different)
discussion in \cite{Grothendieck-Murre}.
Assume we are given
\begin{enumerate}
\item a locally Noetherian scheme $X$,
\item a dense open $U \subset X$,
\item a finite \'etale morphism $f : Y \to U$
\end{enumerate}
such that for every prime divisor $Z \subset X$
with $Z \cap U = \emptyset$ the local ring $\mathcal{O}_{X, \xi}$
of $X$ at the generic point $\xi$ of $Z$ is a discrete valuation ring.
Setting $K_\xi$ equal to the fraction field of $\mathcal{O}_{X, \xi}$
we obtain a cartesian square
$$
\xymatrix{
\Spec(K_\xi) \ar[r] \ar[d] & U \ar[d] \\
\Spec(\mathcal{O}_{X, \xi}) \ar[r] & X
}
$$
of schemes. In particular, we see that $Y \times_U \Spec(K_\xi)$
is the spectrum of a finite separable algebra $L_\xi/K_\xi$.
Then we say
{\it $Y$ is unramified over $X$ in codimension $1$},
resp.\ {\it $Y$ is tamely ramified over $X$ in codimension $1$}
if $L_\xi/K_\xi$ is unramified, resp.\ tamely ramified
with respect to $\mathcal{O}_{X, \xi}$ for every $(Z, \xi)$
as above, see More on Algebra, Definition
\ref{more-algebra-definition-types-of-extensions}.
More precisely, we decompose $L_\xi$ into a product of finite
separable field extensions of $K_\xi$ and we require each of these
to be unramified, resp.\ tamely ramified with respect to
$\mathcal{O}_{X, \xi}$.

\begin{lemma}
\label{lemma-pullback-tame-codim1}
Let $X' \to X$ be a morphism of locally Noetherian schemes.
Let $U \subset X$ be a dense open. Assume
\begin{enumerate}
\item $U' = f^{-1}(U)$ is dense open in $X'$,
\item for every prime divisor $Z \subset X$ with $Z \cap U = \emptyset$
the local ring $\mathcal{O}_{X, \xi}$ of $X$ at the generic point $\xi$
of $Z$ is a discrete valuation ring,
\item for every prime divisor $Z' \subset X'$
with $Z' \cap U' = \emptyset$ the local ring $\mathcal{O}_{X', \xi'}$
of $X'$ at the generic point $\xi'$ of $Z'$ is a discrete valuation ring,
\item if $\xi' \in X'$ is as in (3), then $\xi = f(\xi')$ is as in (2).
\end{enumerate}
Then if $f : Y \to U$ is finite \'etale and
$Y$ is unramified, resp.\ tamely ramified over $X$
in codimension $1$, then $Y' = Y \times_X X' \to U'$ is finite \'etale
and $Y'$ is unramified, resp.\ tamely ramified over $X'$ in codimension $1$.
\end{lemma}

\begin{proof}
The only interesting fact in this lemma is the commutative algebra
result given in More on Algebra, Lemma \ref{more-algebra-lemma-tame-goes-up}.
\end{proof}

\noindent
Using the terminology introduced above, we can reformulate our
purity results obtained earlier in the following pleasing manner.

\begin{lemma}
\label{lemma-purity-one-divisor-general}
Let $X$ be a locally Noetherian scheme. Let $U \subset X$ be open and dense.
Let $Y \to U$ be a finite \'etale morphism. Assume
\begin{enumerate}
\item $Y$ is unramified over $X$ in codimension $1$, and
\item $\mathcal{O}_{X, x}$ is regular for all $x \in X \setminus U$.
\end{enumerate}
Then there exists a finite \'etale morphism $Y' \to X$
whose restriction to $U$ is $Y$.
\end{lemma}

\begin{proof}
Let $\xi \in X \setminus U$ be a generic point of an irreducible component
of $X \setminus U$ of codimension $1$. Then $\mathcal{O}_{X, \xi}$ is a
discrete valuation ring. As in the discussion above, write
$Y \times_U \Spec(K_\xi) = \Spec(L_\xi)$.
Denote $B_\xi$ the integral closure of $\mathcal{O}_{X, \xi}$ in
$L_\xi$. Our assumption that $Y$ is unramified over $X$ in codimension $1$
signifies that $\mathcal{O}_{X, \xi} \to B_\xi$ is finite \'etale.
Thus we get $Y_\xi \to \Spec(\mathcal{O}_{X, \xi})$ finite
\'etale and an isomorphism
$$
Y \times_U \Spec(K_\xi) \cong
Y_\xi \times_{\Spec(\mathcal{O}_{X, \xi})} \Spec(K_\xi)
$$
over $\Spec(K_\xi)$.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
we find an open subscheme $U \subset U' \subset X$
containing $\xi$ and a morphism $Y' \to U'$ of finite presentation
whose restriction to $U$ recovers $Y$ and
whose restriction to $\Spec(\mathcal{O}_{X, \xi})$ recovers $Y_\xi$.
Finally, the morphism $Y' \to U'$ is finite \'etale
after possible shrinking $U'$ to a smaller open by
Limits, Lemma \ref{limits-lemma-glueing-near-point-properties}.
Repeating the argument with the other generic points of
$X \setminus U$ of codimension $1$ we may assume that we have
a finite \'etale morphism $Y' \to U'$ extending $Y \to U$
to an open subscheme containing $U' \subset X$ containing $U$
and all codimension $1$ points of $X \setminus U$.
We finish by applying Lemma \ref{lemma-extend-pure}
to $Y' \to U'$. Namely, all local rings $\mathcal{O}_{X, x}$
for $x \in X \setminus U'$ are regular and
have $\dim(\mathcal{O}_{X, x}) \geq 2$. Hence we have
purity for $\mathcal{O}_{X, x}$ by Lemma \ref{lemma-local-purity}.
\end{proof}

\begin{lemma}
\label{lemma-purity-one-divisor}
Let $X$ be a locally Noetherian scheme. Let $D \subset X$
be an effective Cartier divisor such that $D$ is a regular scheme.
Let $Y \to X \setminus D$ be a finite \'etale morphism.
If $Y$ is unramified over $X$ in codimension $1$, then
there exists a finite \'etale morphism $Y' \to X$
whose restriction to $X \setminus D$ is $Y$.
\end{lemma}

\begin{proof}
This is a special case of Lemma \ref{lemma-purity-one-divisor-general}.
First, $D$ is nowhere dense in $X$ (see discussion in
Divisors, Section \ref{divisors-section-effective-Cartier-divisors})
and hence $X \setminus D$ is dense in $X$. Second, the ring
$\mathcal{O}_{X, x}$ is a regular local ring for all $x \in D$ by
Algebra, Lemma \ref{algebra-lemma-regular-mod-x}
and our assumption that $\mathcal{O}_{D, x}$ is regular.
\end{proof}

\begin{example}[Standard tamely ramified morphism]
\label{example-tamely-ramified}
Let $A$ be a Noetherian ring. Let $f \in A$ be a nonzerodivisor
such that $A/fA$ is reduced. This implies that $A_\mathfrak p$
is a discrete valuation ring with uniformizer $f$ for any
minimal prime $\mathfrak p$ over $f$. Let $e \geq 1$ be an integer which
is invertible in $A$. Set
$$
C = A[x]/(x^e - f)
$$
Then $\Spec(C) \to \Spec(A)$ is a finite locally free morphism
which is \'etale over the spectrum of $A_f$. The finite \'etale morphism
$$
\Spec(C_f) \longrightarrow \Spec(A_f)
$$
is tamely ramified over $\Spec(A)$ in codimension $1$. The
tameness follows immediately from the characterization of tamely ramified
extensions in
More on Algebra, Lemma \ref{more-algebra-lemma-characterize-tame}.
\end{example}

\noindent
Here is a version of Abhyankar's lemma for regular divisors.

\begin{lemma}[Abhyankar's lemma for regular divisor]
\label{lemma-abhyankar-one-divisor}
Let $X$ be a locally Noetherian scheme. Let $D \subset X$
be an effective Cartier divisor such that $D$ is a regular scheme.
Let $Y \to X \setminus D$ be a finite \'etale morphism.
If $Y$ is tamely ramified over $X$ in codimension $1$, then
\'etale locally on $X$ the morphism $Y \to X$ is as given
as a finite disjoint union of standard tamely ramified
morphisms as described in Example \ref{example-tamely-ramified}.
\end{lemma}

\begin{proof}
Before we start we note that $\mathcal{O}_{X, x}$ is a regular
local ring for all $x \in D$. This follows from
Algebra, Lemma \ref{algebra-lemma-regular-mod-x}
and our assumption that $\mathcal{O}_{D, x}$ is regular.
Below we will also use that regular rings are normal, see
Algebra, Lemma \ref{algebra-lemma-regular-normal}.

\medskip\noindent
To prove the lemma we may work locally on $X$.
Thus we may assume $X = \Spec(A)$ and $D \subset X$
is given by a nonzerodivisor $f \in A$.
Then $Y = \Spec(B)$ as a finite \'etale scheme over $A_f$.
Let $\mathfrak p_1, \ldots, \mathfrak p_r$ be the minimal
primes of $A$ over $f$. Then $A_i = A_{\mathfrak p_i}$
is a discrete valuation ring; denote its fraction field $K_i$.
By assumption
$$
K_i \otimes_{A_f} B = \prod L_{ij}
$$
is a finite product of fields each tamely ramified with respect to $A_i$.
Choose $e \geq 1$ sufficiently divisible (namely, divisible by
all ramification indices for $L_{ij}$ over $A_i$ as in
More on Algebra, Remark \ref{more-algebra-remark-finite-separable-extension}).
Warning: at this point we do not know that $e$ is invertible on $A$.

\medskip\noindent
Consider the finite free $A$-algebra
$$
A' = A[x]/(x^e - f)
$$
Observe that $f' = x$ is a nonzerodivisor in $A'$ and that
$A'/f'A' \cong A/fA$ is a regular ring. Set
$B' = B \otimes_A A' = B \otimes_{A_f} A'_{f'}$.
By Abhyankar's lemma
(More on Algebra, Lemma \ref{more-algebra-lemma-abhyankar})
we see that $\Spec(B')$ is unramified over $\Spec(A')$
in codimension $1$. Namely, by Lemma \ref{lemma-pullback-tame-codim1}
we see that $\Spec(B')$ is still at least tamely ramified
over $\Spec(A')$ in codimension $1$. But Abhyankar's lemma
tells us that the ramification indices have all become equal to $1$.
By Lemma \ref{lemma-purity-one-divisor} we conclude that
$\Spec(B') \to \Spec(A'_{f'})$ extends to a finite \'etale morphism
$\Spec(C) \to \Spec(A')$.

\medskip\noindent
For a point $x \in D$ corresponding to $\mathfrak p \in V(f)$
denote $A^{sh}$ a strict henselization of $A_\mathfrak p = \mathcal{O}_{X, x}$.
Observe that $A^{sh}$ and $A^{sh}/fA^{sh} = (A/fA)^{sh}$
(Algebra, Lemma \ref{algebra-lemma-quotient-strict-henselization})
are regular local rings, see
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-regular}.
Observe that $A'$ has a unique prime $\mathfrak p'$ lying over
$\mathfrak p$ with identical residue field. Thus
$$
(A')^{sh} = A^{sh} \otimes_A A' = A^{sh}[x]/(x^e - f)
$$
is a strictly henselian local ring finite over $A^{sh}$
(Algebra, Lemma \ref{algebra-lemma-quasi-finite-strict-henselization}).
Since $f'$ is a nonzerodivisor in $(A')^{sh}$ and since
$(A')^{sh}/f'(A')^{sh} = A^{sh}/fA^{sh}$ is regular, we conclude
that $(A')^{sh}$ is a regular local ring (see above).
Observe that the induced extension
$$
Q(A^{sh}) \subset Q((A')^{sh}) = Q(A^{sh})[x]/(x^e - f)
$$
of fraction fields has degree $e$ (and not less).
Since $A' \to C$ is finite \'etale we see that
$A^{sh} \otimes_A C$ is a finite product of copies of $(A')^{sh}$
(Algebra, Lemma \ref{algebra-lemma-mop-up-strictly-henselian}).
We have the inclusions
$$
A^{sh}_f \subset
A^{sh} \otimes_A B \subset
A^{sh} \otimes_A B' = A^{sh} \otimes_A C_{f'}
$$
and each of these rings is Noetherian and normal; this follows from
Algebra, Lemma \ref{algebra-lemma-normal-goes-up} for the ring
in the middle. Taking total quotient rings, using the product
decomposition of $A^{sh} \otimes_A C$ and using
Fields, Lemma \ref{fields-lemma-subfields-kummer} we conclude that
there is an isomorphism
$$
Q(A^{sh}) \otimes_A B \cong \prod\nolimits_{i \in I} F_i,\quad
F_i \cong Q(A^{sh})[x]/(x^{e_i} - f)
$$
of $Q(A^{sh})$-algebras for some finite set $I$ and integers $e_i | e$.
Since $A^{sh} \otimes_A B$ is a normal ring, it must be the
integral closure of $A^{sh}$ in its total quotient ring.
We conclude that we have an isomorphism
$$
A^{sh} \otimes_A B \cong \prod A^{sh}_f[x]/(x^{e_i} - f)
$$
over $A^{sh}_f$ because the algebras $A^{sh}[x]/(x^{e_i} - f)$
are regular and hence normal. The discriminant of
$A^{sh}[x]/(x^{e_i} - f)$ over $A^{sh}$ is $e_i^{e_i}f^{e_i - 1}$
(up to sign; calculation omitted). Since $A_f \to B$ is finite
\'etale we see that $e_i$ must be invertible in $A^{sh}_f$.
On the other hand, since $A_f \to B$ is tamely ramified
over $\Spec(A)$ in codimension $1$, by Lemma \ref{lemma-pullback-tame-codim1}
the ring map $A^{sh}_f \to A^{sh} \otimes_A B$
is tamely ramified over $\Spec(A^{sh})$ in codimension $1$.
This implies $e_i$ is nonzero in $A^{sh}/fA^{sh}$
(as it must map to an invertible element of the fraction field of
this domain by definition of tamely ramified extensions).
We conclude that $V(e_i) \subset \Spec(A^{sh})$
has codimension $\geq 2$ which is absurd unless it is empty.
In other words, $e_i$ is an invertible element of $A^{sh}$.
We conclude that the pullback of $Y$ to $\Spec(A^{sh})$
is indeed a finite disjoint union of standard tamely ramified morphisms.

\medskip\noindent
To finish the proof, we write $A^{sh} = \colim A_\lambda$
as a filtered colimit of \'etale $A$-algebras $A_\lambda$.
The isomorphism
$$
A^{sh} \otimes_A B \cong
\prod\nolimits_{i \in I} A^{sh}_f[x]/(x^{e_i} - f)
$$
descends to an isomorphism
$$
A_\lambda \otimes_A B \cong \prod\nolimits_{i \in I}
(A_\lambda)_f[x]/(x^{e_i} - f)
$$
for suitably large $\lambda$. After increasing $\lambda$ a bit
more we may assume $e_i$ is invertible in $A_\lambda$. Then
$\Spec(A_\lambda) \to \Spec(A)$ is the desired \'etale neighbourhood
of $x$ and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-extend-tame-covering-normal}
In the situation of Lemma \ref{lemma-abhyankar-one-divisor}
the normalization of $X$ in $Y$ is a finite locally free morphism
$\pi : Y' \to X$ such that
\begin{enumerate}
\item the restriction of $Y'$ to $X \setminus D$ is isomorphic to $Y$,
\item $D' = \pi^{-1}(D)_{red}$ is an effective Cartier divisor on $Y'$, and
\item $D'$ is a regular scheme.
\end{enumerate}
Moreover, \'etale locally on $X$ the morphism $Y' \to X$ is a finite disjoint
union of morphisms
$$
\Spec(A[x]/(x^e - f)) \to \Spec(A)
$$
where $A$ is a Noetherian ring, $f \in A$ is a nonzerodivisor with
$A/fA$ regular, and $e \geq 1$ is invertible in $A$.
\end{lemma}

\begin{proof}
This is just an addendum to Lemma \ref{lemma-abhyankar-one-divisor}
and in fact the truth of this lemma follows almost immediately if
you've read the proof of that lemma. But we can also deduce
the lemma from the result of Lemma \ref{lemma-abhyankar-one-divisor}.
Namely, taking the normalization of $X$ in $Y$ commutes with
\'etale base change, see More on Morphisms, Lemma
\ref{more-morphisms-lemma-normalization-smooth-localization}.
Hence we see that we may prove the statements on the local structure
of $Y' \to X$ \'etale locally on $X$. Thus, by
Lemma \ref{lemma-abhyankar-one-divisor} we may assume that
$X = \Spec(A)$ where $A$ is a Noetherian ring, that we have a
nonzerodivisor $f\in A$ such that $A/fA$ is regular, and that $Y$
is a finite disjoint union of spectra of rings $A_f[x]/(x^e - f)$
where $e$ is invertible in $A$. We omit the verification that
the integral closure of $A$ in $A_f[x]/(x^e - f)$ is
equal to $A' = A[x]/(x^e - f)$. (To see this argue that
the localizations of $A'$ at primes lying over $(f)$ are regular.)
We omit the details.
\end{proof}

\begin{lemma}
\label{lemma-tame-covering-split}
In the situation of Lemma \ref{lemma-abhyankar-one-divisor}
let $Y' \to X$ be as in Lemma \ref{lemma-extend-tame-covering-normal}.
Let $R$ be a discrete valuation ring with fraction field $K$.
Let
$$
t : \Spec(R) \to X
$$
be a morphism such that the scheme theoretic inverse image
$t^{-1}D$ is the reduced closed point of $\Spec(R)$.
\begin{enumerate}
\item If $t|_{\Spec(K)}$ lifts to a point of $Y$, then
we get a lift $t' : \Spec(R) \to Y'$ such that $Y' \to X$
is \'etale along $t'(\Spec(R))$.
\item If $\Spec(K) \times_X Y$ is isomorphic to a disjoint union
of copies of $\Spec(K)$, then $Y' \to X$ is finite \'etale
over an open neighbourhood of $t(\Spec(R))$.
\end{enumerate}
\end{lemma}

\begin{proof}
By the valuative criterion of properness applied to
the finite morphism $Y' \to X$ we see that $\Spec(K)$-valued
points of $Y$ matching $t|_{\Spec(K)}$ as maps into $X$
lift uniquely to morphisms $t' : \Spec(R) \to Y'$.
Thus statement (1) make sense.

\medskip\noindent
Choose an \'etale neighbourhood $(U, u) \to (X, t(\mathfrak m_R))$
such that $U = \Spec(A)$ and such that $Y' \times_X U \to U$
has a description as in Lemma \ref{lemma-extend-tame-covering-normal}
for some $f \in A$. Then $\Spec(R) \times_X U \to \Spec(R)$ is \'etale
and surjective. If $R'$ denotes the local ring of
$\Spec(R) \times_X U$ lying over the closed point of $\Spec(R)$,
then $R'$ is a discrete valuation ring and $R \subset R'$
is an unramified extension of discrete valuation rings
(More on Algebra, Lemma \ref{more-algebra-lemma-Dedekind-etale-extension}).
The assumption on $t$ signifies that the map $A \to R'$
corresponding to
$$
\Spec(R') \to \Spec(R) \times_X U \to U
$$
maps $f$ to a uniformizer $\pi \in R'$. Now suppose that
$$
Y' \times_X U =
\coprod\nolimits_{i \in I} \Spec(A[x]/(x^{e_i} - f))
$$
for some $e_i \geq 1$. Then we see that
$$
\Spec(R') \times_U (Y' \times_X U) =
\coprod\nolimits_{i \in I} \Spec(R'[x]/(x^{e_i} - \pi))
$$
The rings $R'[x]/(x^{e_i} - f)$ are discrete valuation rings
(More on Algebra, Lemma \ref{more-algebra-lemma-pull-root-uniformizer})
and hence have no map into the fraction field of $R'$ unless $e_i = 1$.

\medskip\noindent
Proof of (1). In this case the map $t' : \Spec(R) \to Y'$ base changes
to determine a corresponding map $t'' : \Spec(R') \to Y' \times_X U$
which must map into a summand corresponding to $i \in I$ with $e_i = 1$
by the discussion above. Thus clearly we see that $Y' \times_X U \to U$
is \'etale along the image of $t''$. Since being \'etale is a property
one can check after \'etale base chamge, this proves (1).

\medskip\noindent
Proof of (2). In this case the assumption implies that $e_i = 1$
for all $i \in I$. Thus $Y' \times_X U \to U$ is finite \'etale
and we conclude as before.
\end{proof}

\begin{lemma}
\label{lemma-extend-covering}
Let $S$ be an integral normal Noetherian scheme with generic point $\eta$.
Let $f : X \to S$ be a smooth morphism with geometrically connected fibres.
Let $\sigma : S \to X$ be a section of $f$. Let $Z \to X_\eta$ be a
finite \'etale Galois cover (Section \ref{section-finite-etale-under-galois})
with group $G$ of order invertible on $S$ such that
$Z$ has a $\kappa(\eta)$-rational point mapping to $\sigma(\eta)$.
Then there exists a finite \'etale Galois cover $Y \to X$ with group $G$
whose restriction to $X_\eta$ is $Z$.
\end{lemma}

\begin{proof}
First assume $S = \Spec(R)$ is the spectrum of a discrete valuation ring $R$
with closed point $s \in S$. Then $X_s$ is an effective Cartier
divisor in $X$ and $X_s$ is regular as a scheme smooth over a field.
Moreover the generic fibre $X_\eta$ is the open subscheme $X \setminus X_s$.
It follows from
More on Algebra, Lemma \ref{more-algebra-lemma-galois-conclusion}
and the assumption on $G$ that $Z$ is tamely ramified
over $X$ in codimension $1$. Let $Z' \to X$ be as in
Lemma \ref{lemma-extend-tame-covering-normal}. Observe that
the action of $G$ on $Z$ extends to an action of $G$ on $Z'$.
By Lemma \ref{lemma-tame-covering-split}
we see that $Z' \to X$ is finite \'etale over an open
neighbourhood of $\sigma(y)$.
Since $X_s$ is irreducible, this implies $Z \to X_\eta$
is unramified over $X$ in codimension $1$.
Then we get a finite \'etale morphism $Y \to X$
whose restriction to $X_\eta$ is $Z$ by
Lemma \ref{lemma-purity-one-divisor}.
Of course $Y \cong Z'$ (details omitted; hint: compute \'etale locally)
and hence $Y$ is a Galois cover with group $G$.

\medskip\noindent
General case. Let $U \subset S$ be a maximal open subscheme
such that there exists a finite \'etale Galois cover
$Y \to X \times_S U$ with group $G$
whose restriction to $X_\eta$ is isomorphic to $Z$.
Assume $U \not = S$ to get a contradiction.
Let $s \in S \setminus U$ be a generic point of an irreducible
component of $S \setminus U$. Then the inverse image $U_s$
of $U$ in $\Spec(\mathcal{O}_{S, s})$
is the punctured spectrum of $\mathcal{O}_{S, s}$.
We claim $Y \times_S U_s \to X \times_S U_s$
is the restriction of a finite \'etale Galois cover
$Y'_s \to X \times_S \Spec(\mathcal{O}_{S, s})$
with group $G$.

\medskip\noindent
Let us first prove the claim produces the desired contradiction.
By Limits, Lemma \ref{limits-lemma-glueing-near-point}
we find an open subscheme $U \subset U' \subset S$
containing $s$ and a morphism $Y'' \to U'$ of finite presentation
whose restriction to $U$ recovers $Y' \to U$ and
whose restriction to $\Spec(\mathcal{O}_{S, s})$ recovers $Y'_s$.
Moreover, by the equivalence of categories given in the
lemma, we may assume after shrinking $U'$
there is a morphism $Y'' \to U' \times_S X$
and there is an action of $G$ on $Y''$ over $U' \times_S X$
compatible with the given morphisms and actions after base
change to $U$ and $\Spec(\mathcal{O}_{S, s})$.
After shrinking $U'$ further if necessary, we may
assume $Y'' \to U \times_S X$ is finite \'etale, see
Limits, Lemma \ref{limits-lemma-glueing-near-point-properties}.
This means we have found a strictly larger open of $S$ over which
$Y$ extends to a finite \'etale Galois cover with group $G$
which gives the contradiction we were looking for.

\medskip\noindent
Proof of the claim. We may and do replace $S$ by $\Spec(\mathcal{O}_{S, s})$.
Then $S = \Spec(A)$ where $(A, \mathfrak m)$ is a local normal domain.
Also $U \subset S$ is the punctured spectrum and we have a finite
\'etale Galois cover $Y \to X \times_S U$ with group $G$.
If $\dim(A) = 1$, then we can construct the extension of $Y$ to
a Galois covering of $X$ by the first paragraph of the proof.
Thus we may assume $\dim(A) \geq 2$ and hence $\text{depth}(A) \geq 2$
as $S$ is normal, see Algebra, Lemma \ref{algebra-lemma-criterion-normal}.
Since $X \to S$ is flat, we conclude that
$\text{depth}(\mathcal{O}_{X, x}) \geq 2$ for every point $x \in X$
mapping to $s$, see
Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}.
Let
$$
Y' \longrightarrow X
$$
be the finite morphism constructed in Lemma \ref{lemma-extend-S2}
using $Y \to X \times_S U$. Observe that we obtain a canonical
$G$-action on $Y$. Thus all that remains is to show that $Y'$
is \'etale over $X$. In fact, by
Lemma \ref{lemma-purity-smooth-over-depth2} (for example)
it even suffices to show that $Y' \to X$ is \'etale over the
(unique) generic point of the fibre $X_s$. This we do by
a local calculation in a (formal) neighbourhood of $\sigma(s)$.

\medskip\noindent
Choose an affine open $\Spec(B) \subset X$ containing $\sigma(s)$.
Then $A \to B$ is a smooth ring map which has a section $\sigma : B \to A$.
Denote $I = \Ker(\sigma)$ and denote $B^\wedge$ the
$I$-adic completion of $B$. Then $B^\wedge \cong A[[x_1, \ldots, x_d]]$
for some $d \geq 0$, see
Algebra, Lemma \ref{algebra-lemma-section-smooth}.
Of course $B \to B^\wedge$ is flat
(Algebra, Lemma \ref{algebra-lemma-completion-flat})
and the image of $\Spec(B^\wedge) \to X$ contains the generic point of $X_s$.
Let $V \subset \Spec(B^\wedge)$ be the inverse image of $U$.
Consider the finite \'etale morphism
$$
W = Y \times_{(X \times_S U)} V \longrightarrow V
$$
By the compatibility of the construction of $Y'$
with flat base change in Lemma \ref{lemma-extend-S2}
we find that the base chang
$Y' \times_X \Spec(B^\wedge) \to \Spec(B^\wedge)$
is constructed from $W \to V$ over $\Spec(B^\wedge)$
by the procedure in Lemma \ref{lemma-extend-S2}.
Set $V_0 = V \cap V(x_1, \ldots, x_d) \subset V$ and $W_0 = W \times_V V_0$.
This is a normal integral scheme which maps into $\sigma(S)$
by the morphism $\Spec(B^\wedge) \to X$ and in fact is identified
with $\sigma(U)$. Hence we know that $W_0 \to V_0 = U$ completely decomposes
as this is true for its generic fibre by our assumption
on $Z \to X_\eta$ having a $\kappa(\eta)$-rational point lying over
$\sigma(\eta)$ (and of course the $G$-action then implies the whole
fibre $Z_{\sigma(\eta)}$ is a disjoint union of copies of
the scheme $\eta = \Spec(\kappa(\eta))$).
Finally, by
Lemma \ref{lemma-fully-faithful-power-series-over-depth2}
we have
$$
W_0 \times_U V \cong W
$$
This shows that $W$ is a disjoint union of copies of $V$
and hence $Y' \times_X \Spec(B^\wedge)$ is a disjoint
union of copies of $\Spec(B^\wedge)$ and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-extend-covering-general}
Let $S$ be a quasi-compact and quasi-separated integral normal scheme
with generic point $\eta$. Let $f : X \to S$ be a quasi-compact and
quasi-separated smooth morphism with geometrically connected fibres.
Let $\sigma : S \to X$ be a section of $f$. Let $Z \to X_\eta$ be a
finite \'etale Galois cover (Section \ref{section-finite-etale-under-galois})
with group $G$ of order invertible on $S$ such that
$Z$ has a $\kappa(\eta)$-rational point mapping to $\sigma(\eta)$.
Then there exists a finite \'etale Galois cover $Y \to X$ with group $G$
whose restriction to $X_\eta$ is $Z$.
\end{lemma}

\begin{proof}
If $S$ is Noetherian, then this is the result of
Lemma \ref{lemma-extend-covering}. The general case
follows from this by a standard limit argument.
We strongly urge the reader to skip the proof.

\medskip\noindent
We can write $S = \lim S_i$ as a directed limit of a system
of schemes with affine transition morphisms and with $S_i$ of
finite type over $\mathbf{Z}$, see
Limits, Proposition \ref{limits-proposition-approximate}.
For each $i$ let $S \to S'_i \to S_i$ be the normalization
of $S_i$ in $S$, see
Morphisms, Section \ref{morphisms-section-normalization-X-in-Y}.
Combining Algebra, Proposition \ref{algebra-proposition-ubiquity-nagata}
Morphisms, Lemmas \ref{morphisms-lemma-nagata-normalization-finite} and
\ref{morphisms-lemma-normal-normalization}
we conclude that $S'_i$ is of finite type over $\mathbf{Z}$,
finite over $S_i$, and that $S'_i$ is an integral normal
scheme such that $S \to S'_i$ is dominant.
By Morphisms, Lemma \ref{morphisms-lemma-functoriality-normalization}
we obtain transition morphisms $S'_{i'} \to S'_i$ compatible
with the transition morphisms $S_{i'} \to S_i$ and with
the morphisms with source $S$.
We claim that $S = \lim S'_i$. Proof of claim omitted (hint:
look on affine opens over a chosen affine open in $S_i$
for some $i$ to translate this into a straightforward algebra
problem). We conclude that we may write $S = \lim S_i$
as a directed limit of a system of normal integral schemes $S_i$
with affine transition morphisms and with $S_i$ of
finite type over $\mathbf{Z}$.

\medskip\noindent
For some $i$ we can find a smooth morphism $X_i \to S_i$
of finite presentation whose base change to $S$ is $X \to S$.
See Limits, Lemmas
\ref{limits-lemma-descend-finite-presentation} and
\ref{limits-lemma-descend-smooth}.
After increasing $i$ we may assume the section
$\sigma$ lifts to a section $\sigma_i : S_i \to X_i$
(by the equivalence of categories in
Limits, Lemma \ref{limits-lemma-descend-finite-presentation}).
We may replace $X_i$ by the open subscheme $X_i^0$
of it studied in More on Morphisms, Section
\ref{more-morphisms-section-connected-components}
since the image of $X \to X_i$ clearly maps into it
(openness by More on Morphisms, Lemma
\ref{more-morphisms-lemma-connected-along-section-open}).
Thus we may assume the fibres of $X_i \to S_i$ are
geometrically connected.
After increasing $i$ we may assume $|G|$ is invertible
on $S_i$.
Let $\eta_i \in S_i$ be the generic point.
Since $X_\eta$ is the limit of the schemes
$X_{i, \eta_i}$ we can use the exact same arguments
to descent $Z \to X_\eta$ to some finite \'etale Galois
cover $Z_i \to X_{i, \eta_i}$ after possibly increasing $i$.
See Lemma \ref{lemma-limit}.
After possibly increasing $i$ once more we may
assume $Z_i$ has a $\kappa(\eta_i)$-rational point
mapping to $\sigma_i(\eta_i)$.
Then we apply the lemma in the Noetherian case
and we pullback to $X$ to conclude.
\end{proof}











\section{Tricks in positive characteristic}
\label{section-achinger}

\noindent
In Piotr Achinger's paper \cite{Achinger} it is shown that an
affine scheme in positive characteristic is always a $K(\pi, 1)$.
In this section we explain the more elementary parts of \cite{Achinger}.
Namely, we show that for a field $k$ of positive characteristic
an affine scheme \'etale over $\mathbf{A}^n_k$ is actually finite \'etale
over $\mathbf{A}^n_k$ (by a different morphism). We also show
that a closed immersion of connected affine schemes
in positive characteristic induces an injective map on
\'etale fundamental groups.

\medskip\noindent
Let $k$ be a field of characteristic $p > 0$.
Let
$$
k[x_1, \ldots, x_n] \longrightarrow A
$$
be a surjection of finite type $k$-algebras whose source is the
polynomial algebra on $x_1, \ldots, x_n$. Denote
$I \subset k[x_1, \ldots, x_n]$ the kernel so that we have
$A = k[x_1, \ldots, x_n]/I$. We do not assume $A$ is nonzero
(in other words, we allow the case where $A$ is the zero ring
and $I = k[x_1, \ldots, x_n]$). Finally, we assume given a
finite \'etale ring map $\pi : A \to B$.

\medskip\noindent
Suppose given $k, n, k[x_1, \ldots, x_n] \to A, I, \pi : A \to B$.
Let $C$ be a $k$-algebra. Consider
commutative diagrams
$$
\xymatrix{
& B \\
C \ar[r] & C/\varphi(I)C \ar[u]^\tau \\
k[x_1, \ldots, x_n] \ar[u]^\varphi \ar[r] &
A \ar[u] \ar@/_3em/[uu]_\pi
}
$$
where $\varphi$ is an \'etale $k$-algebra map and $\tau$ is a
surjective $k$-algebra map.
Let $C, \varphi, \tau$ be given. For any $r \geq 0$ and
$y_1, \ldots, y_r \in C$ which generate $C$ as an algebra over
$\Im(\varphi)$ let $s = s(r, y_1, \ldots, y_r) \in \{0, \ldots, r\}$
be the maximal element such that $y_i$ is integral over $\Im(\varphi)$
for $1 \leq i \leq s$. We define $NF(C, \varphi, \tau)$
to be the minimum value of
$r - s = r - s(r, y_1, \ldots, y_r)$ for all choices of
$r$ and $y_1, \ldots, y_r$ as above.
Observe that $NF(C, \varphi, \tau)$ is $0$ if and only if $\varphi$ is finite.

\begin{lemma}
\label{lemma-lower-invariant}
In the situation above, if $NF(C, \varphi, \tau) > 0$, then there exist
an \'etale $k$-algebra map $\varphi'$ and a surjective $k$-algebra map
$\tau'$ fitting into the commutative diagram
$$
\xymatrix{
& B \\
C \ar[r] & C/\varphi'(I)C \ar[u]_{\tau'} \\
k[x_1, \ldots, x_n] \ar[u]^{\varphi'} \ar[r] &
A \ar[u] \ar@/_3em/[uu]_\pi
}
$$
with $NF(C, \varphi', \tau') < NF(C, \varphi, \tau)$.
\end{lemma}

\begin{proof}
Choose $r \geq 0$ and $y_1, \ldots, y_r \in C$ which generate
$C$ over $\Im(\varphi)$ and let $0 \leq s \leq r$ be such that
$y_1, \ldots, y_s$ are integral over $\Im(\varphi)$
such that $r - s = NF(C, \varphi, \tau) > 0$.
Since $B$ is finite over $A$, the image of $y_{s + 1}$ in $B$
satisfies a monic polynomial over $A$. Hence we can find
$d \geq 1$ and $f_1, \ldots, f_d \in k[x_1, \ldots, x_n]$
such that
$$
z = y_{s + 1}^d + \varphi(f_1) y_{s + 1}^{d - 1} + \ldots + \varphi(f_d) \in
J = \Ker(C \to C/\varphi(I)C \xrightarrow{\tau} B)
$$
Since $\varphi : k[x_1, \ldots, x_n] \to C$ is \'etale, we can find a
nonzero and nonconstant polynomial $g \in k[T_1, \ldots, T_{n + 1}]$
such that
$$
g(\varphi(x_1), \ldots, \varphi(x_n), z) = 0
\quad\text{in}\quad
C
$$
To see this you can use for example that
$C \otimes_{\varphi, k[x_1, \ldots, x_n]} k(x_1, \ldots, x_n)$
is a finite product of finite separable field extensions
of $k(x_1, \ldots, x_n)$
(see Algebra, Lemmas \ref{algebra-lemma-etale-over-field})
and hence $z$ satisfies a monic
polynomial over $k(x_1, \ldots, x_n)$. Clearing denominators
we obtain $g$.

\medskip\noindent
The existence of $g$ and
Algebra, Lemma \ref{algebra-lemma-helper-polynomial}
produce integers $e_1, e_2, \ldots, e_n \geq 1$ such that
$z$ is integral over the subring $C'$ of $C$ generated by
$t_1 = \varphi(x_1) + z^{pe_1}, \ldots, t_n = \varphi(x_n) + z^{pe_n}$.
Of course, the elements $\varphi(x_1), \ldots, \varphi(x_n)$
are also integral over $C'$ as are the elements
$y_1, \ldots, y_s$. Finally, by our choice of $z$ the element
$y_{s + 1}$ is integral over $C'$ too.

\medskip\noindent
Consider the ring map
$$
\varphi' : k[x_1, \ldots, x_n] \longrightarrow C, \quad
x_i \longmapsto t_i
$$
with image $C'$. Since
$\text{d}(\varphi(x_i)) = \text{d}(t_i) = \text{d}(\varphi'(x_i))$
in $\Omega_{C/k}$ (and this is where we use the characteristic of $k$
is $p > 0$) we conclude that $\varphi'$ is \'etale because $\varphi$ is
\'etale, see
Algebra, Lemma \ref{algebra-lemma-characterize-etale-over-polynomial-ring}.
Observe that $\varphi'(x_i) - \varphi(x_i) = t_i - \varphi(x_i) = z^{pe_i}$
is in the kernel $J$ of the map $C \to C/\varphi(I)C \to B$ by our
choice of $z$ as an element of $J$.
Hence for $f \in I$ the element
$$
\varphi'(f) =
f(t_1, \ldots, t_n) =
f(\varphi(x_1) + z^{pe_1}, \ldots, \varphi(x_n) + z^{pe_n}) =
\varphi(f) + \text{element of }(z)
$$
is in $J$ as well. In other words, $\varphi'(I)C \subset J$ and
we obtain a surjection
$$
\tau' : C/\varphi'(I)C \longrightarrow C/J \cong B
$$
of algebras \'etale over $A$. Finally, the algebra
$C$ is generated by the elements
$\varphi(x_1), \ldots, \varphi(x_n), y_1, \ldots, y_r$
over $C' = \Im(\varphi')$ with
$\varphi(x_1), \ldots, \varphi(x_n), y_1, \ldots, y_{s + 1}$
integral over $C' = \Im(\varphi')$. Hence
$NF(C, \varphi', \tau') < r - s = NF(C, \varphi, \tau)$.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-affine-etale-over-affine-space}
Let $k$ be a field of characteristic $p > 0$. Let $X \to \mathbf{A}^n_k$ be an
\'etale morphism with $X$ affine. Then there exists a finite \'etale
morphism $X \to \mathbf{A}^n_k$.
\end{lemma}

\begin{proof}
Write $X = \Spec(C)$. Set $A = 0$ and denote $I = k[x_1, \ldots, x_n]$.
By assumption there exists some \'etale $k$-algebra map
$\varphi : k[x_1, \ldots, x_n] \to C$. Denote $\tau : C/\varphi(I)C \to 0$
the unique surjection. We may choose $\varphi$ and $\tau$ such
that $N(C, \varphi, \tau)$ is minimal. By Lemma \ref{lemma-lower-invariant}
we get $N(C, \varphi, \tau) = 0$. Hence $\varphi$ is finite \'etale.
\end{proof}

\begin{lemma}
\label{lemma-dominate-affine-space}
Let $k$ be a field of characteristic $p > 0$. Let $Z \subset \mathbf{A}^n_k$
be a closed subscheme. Let $Y \to Z$ be finite \'etale. There exists a
finite \'etale morphism $f : U \to \mathbf{A}^n_k$ such that
there is an open and closed immersion $Y \to f^{-1}(Z)$ over $Z$.
\end{lemma}

\begin{proof}
Let us turn the problem into algebra. Write
$\mathbf{A}^n_k = \Spec(k[x_1, \ldots, x_n])$.
Then $Z = \Spec(A)$ where $A = k[x_1, \ldots, x_n]/I$
for some ideal $I \subset k[x_1, \ldots, x_n]$.
Write $Y = \Spec(B)$ so that $Y \to Z$ corresponds to
the finite \'etale $k$-algebra map $A \to B$.

\medskip\noindent
By Algebra, Lemma \ref{algebra-lemma-lift-etale}
there exists an \'etale ring map
$$
\varphi : k[x_1, \ldots, x_n] \to C
$$
and a surjective $A$-algebra map $\tau : C/\varphi(I)C \to B$.
(We can even choose $C, \varphi, \tau$ such that $\tau$ is an isomorphism,
but we won't use this). We may choose $\varphi$ and $\tau$ such
that $N(C, \varphi, \tau)$ is minimal. By Lemma \ref{lemma-lower-invariant}
we get $N(C, \varphi, \tau) = 0$. Hence $\varphi$ is finite \'etale.

\medskip\noindent
Let $f : U = \Spec(C) \to \mathbf{A}^n_k$ be the finite \'etale
morphism corresponding to $\varphi$. The morphism
$Y \to f^{-1}(Z) = \Spec(C/\varphi(I)C)$ induced by $\tau$
is a closed immersion as $\tau$ is surjective and open as
it is an \'etale morphism by Morphisms, Lemma
\ref{morphisms-lemma-etale-permanence}. This finishes the proof.
\end{proof}

\noindent
Here is the main result.

\begin{proposition}
\label{proposition-injective}
Let $p$ be a prime number. Let $i : Z \to X$ be a closed immersion
of connected affine schemes over $\mathbf{F}_p$. For any geometric
point $\overline{z}$ of $Z$ the map
$$
\pi_1(Z, \overline{z}) \to \pi_1(X, \overline{z})
$$
is injective.
\end{proposition}

\begin{proof}
Let $Y \to Z$ be a finite \'etale morphism. It suffices to construct
a finite \'etale morphism $f : U \to X$ such that $Y$ is isomorphic to
an open and closed subscheme of $f^{-1}(Z)$, see
Lemma \ref{lemma-functoriality-galois-injective}.
Write $Y = \Spec(A)$ and $X = \Spec(R)$ so the closed immersion
$Y \to X$ is given by a surjection $R \to A$. We may write
$A = \colim A_i$ as the filtered colimit of its $\mathbf{F}_p$-subalgebras
of finite type. By Lemma \ref{lemma-limit}
we can find an $i$ and a finite \'etale morphism $Y_i \to Z_i = \Spec(A_i)$
such that $Y = Z \times_{Z_i} Y_i$.

\medskip\noindent
Choose a surjection $\mathbf{F}_p[x_1, \ldots, x_n] \to A_i$.
This determines a closed immersion
$$
Z_i = \Spec(A_i)
\longrightarrow
X_i = \mathbf{A}^n_{\mathbf{F}_p} = \Spec(\mathbf{F}_p[x_1, \ldots, x_n])
$$
By the universal property of polynomial algebras and since
$R \to A$ is surjective, we can find a commutative diagram
$$
\xymatrix{
\mathbf{F}_p[x_1, \ldots, x_n] \ar[r] \ar[d] &
A_i \ar[d] \\
R \ar[r] &
A
}
$$
of $\mathbf{F}_p$-algebras. Thus we have a commutative diagram
$$
\xymatrix{
Y_i \ar[r] &
Z_i \ar[r] &
X_i \\
Y \ar[u] \ar[r] &
Z \ar[u] \ar[r] &
X \ar[u]
}
$$
whose right square is cartesian. Clearly, if we can
find $f_i : U_i \to X_i$ finite \'etale such that $Y_i$ is
isomorphic to an open and closed subscheme of $f_i^{-1}(Z_i)$,
then the base change $f : U \to X$ of $f_i$ by $X \to X_i$
is a solution to our problem. Thus we conclude by applying
Lemma \ref{lemma-dominate-affine-space} to
$Y_i \to Z_i \to X_i = \mathbf{A}^n_{\mathbf{F}_p}$.
\end{proof}











\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
